1CG-DIFF(1) CG-DIFF(1)
2
3
4
6 cg-diff - show changes in the diff format
7
9 cg-diff [-c] [-m] [-s] [-p] [-r FROM_ID[..TO_ID]] [FILE]...
10
11
13 Outputs a diff for converting the first tree to the second one. By
14 default compares the current working tree to the state at the last
15 commit. The output will automatically be displayed in a pager unless it
16 is piped to a program.
17
18
20 -c Colorize the output. You can customize the colors using the
21 $CG_COLORS environment variable (see below).
22
23 --diffcore ARGS
24 Pass the given diffcore arguments the called Git diff command.
25 See e.g. git-diff-tree(1) documentation for the list of possible
26 arguments; -R, -B, and -C might be of particular interest (-M is
27 already passed by default).
28
29 --no-renames
30 By default, cg-diff(1) will automatically detect file renames.
31 Diff produced by the rename-aware cg-diff(1) will be unappliable
32 using patch(1) (you need to use cg-patch(1)) and the renames
33 detection can add slight extra performance penalty. This switch
34 will turn the rename detection off.
35
36 -p Show diff to the parent of the current commit (or the commit
37 specified by the -r parameter).
38
39 -s Summarize the diff by showing a histogram for removed and added
40 lines (similar to the output of diffstat(1)) and information
41 about added and renamed files and mode changes.
42
43 -r FROM_ID[..TO_ID]
44 Specify the revisions to diff using either -r rev1..rev2 or -r
45 rev1 -r rev2. If no revision is specified, the current working
46 tree is implied. Note that no revision is different from empty
47 revision which means -r rev.. compares between rev and HEAD,
48 while -r rev compares between rev and working tree.
49
50 -m Base the diff at the merge base of the -r arguments (defaulting
51 to HEAD and origin).
52
53 -h, --help
54 Print usage summary.
55
56 --long-help
57 Print user manual. The same as found in cg-diff(1).
58
60 PAGER The pager to display log information in, defaults to less.
61
62 PAGER_FLAGS
63 Flags to pass to the pager.
64
65 CG_COLORS
66 Colon-separated list of name=color pairs, where name is one of
67 diffhdr, diffhdradd, diffhdrmod, diffhdrrem, diffadd, diffmod,
68 diffrem, diffhunk, diffctx, default, and value is an ECMA-48 SGR
69 sequence (see e.g. console_codes(4)).
70
71 CG_COLORS_AUTO
72 Even if -c was passed or specified in ~/.cgrc, if this option is
73 set, use colors only when the output is a terminal and it
74 supports colors.
75
76 CG_LESS
77 This is what the $LESS environment variable value will be set to
78 before invoking $PAGER. It defaults to $LESS concatenated with
79 the R flag to allow displaying of colorized output.
80
82 The following GIT configuration file variables are recognized:
83
84
85 diff.usecolor
86 If enabled, colorify the output like with -c if the output is a
87 terminal.
88
90 The : is equivalent to .. in revisions range specification (to make
91 things more comfortable to SVN users). See cogito(7) for more details
92 about revision specification.
93
94
96 Copyright © Petr Baudis, 2005
97
98
100 cg-diff is part of cogito(7), a toolkit for managing git(7) trees.
101
102
103
104
105 12/11/2006 CG-DIFF(1)