cg-diff - show changes in the diff format
cg-diff [-c] [-m] [-s] [-p] [-r FROM_ID[..TO_ID]] [FILE]…
Outputs a diff for converting the first tree to the second one. By default compares the current working tree to the state at the last commit. The output will automatically be displayed in a pager unless it is piped to a program.
Colorize the output. You can customize the colors using the $CG_COLORS environment variable (see below).
Pass the given diffcore arguments the called Git diff command. See e.g. git-diff-tree(1) documentation for the list of possible arguments; -R, -B, and -C might be of particular interest (-M is already passed by default).
By default, cg-diff(1) will automatically detect file renames. Diff produced by the rename-aware cg-diff(1) will be unappliable using patch(1) (you need to use cg-patch(1)) and the renames detection can add slight extra performance penalty. This switch will turn the rename detection off.
Show diff to the parent of the current commit (or the commit specified by the -r parameter).
Summarize the diff by showing a histogram for removed and added lines (similar to the output of diffstat(1)) and information about added and renamed files and mode changes.
Specify the revisions to diff using either -r rev1..rev2 or -r rev1 -r rev2. If no revision is specified, the current working tree is implied. Note that no revision is different from empty revision which means -r rev.. compares between rev and HEAD, while -r rev compares between rev and working tree.
Base the diff at the merge base of the -r arguments (defaulting to HEAD and origin or the current branch's default remote branch, see cg-fetch(1) for details).
Print usage summary.
Print user manual. The same as found in cg-diff(1).
Print Cogito version.
The pager to display log information in, defaults to less.
Flags to pass to the pager.
Colon-separated list of name=color pairs, where name is one of diffhdr, diffhdradd, diffhdrmod, diffhdrrem, diffadd, diffmod, diffrem, diffhunk, diffctx, default, and value is an ECMA-48 SGR sequence (see e.g. console_codes(4)).
Even if -c was passed or specified in ~/.cgrc, if this option is set, use colors only when the output is a terminal and it supports colors.
This is what the $LESS environment variable value will be set to before invoking $PAGER. It defaults to $LESS concatenated with the R flag to allow displaying of colorized output.
The following GIT configuration file variables are recognized:
If enabled, colorify the output like with -c if the output is a terminal.
The : is equivalent to .. in revisions range specification (to make things more comfortable to SVN users). See cogito(7) for more details about revision specification.
Copyright © Petr Baudis, 2005