1CG-LOG(1)                                                            CG-LOG(1)
2
3
4

NAME

6       cg-log - show the list of changes
7

SYNOPSIS

9       cg-log [-D DATE] [-r FROM_ID[..TO_ID]] [-d] [-s | --summary]
10       [OTHER_OPTIONS] [FILE]...
11
12

DESCRIPTION

14       Display log of changes on a given branch, within a given range of
15       commits, and/or concerning given set of files. The log can be further
16       filtered to e.g. only changes touching a given string or done by a
17       given user. Several output formats are available.
18
19       The output will automatically be displayed in a pager unless it is
20       piped to a program.
21
22

OPTIONS

24       Arguments not interpreted as options will be interpreted as filenames;
25       cg-log then displays only changes in those files.
26
27       -c     Colorize the output. You can customize the colors using the
28              $CG_COLORS environment variable (see below).
29
30       -d     Accompany each commit with a diff against previous commit. Turns
31              off -f.
32
33       --diffcore ARGS
34              Pass the given diffcore arguments the called Git diff command.
35              See e.g. git-diff-tree(1) documentation for the list of possible
36              arguments; -R, -B, and -C might be of particular interest (-M is
37              sometimes passed automatically, but not always). This is mostly
38              only relevant in conjunction with the -d option.
39
40       -f     List affected files. (No effect when passed along -s.) Turns off
41              -d.
42
43       -r FROM_ID[..TO_ID]
44              Limit the log information to a set of revisions using either -r
45              FROM_ID[..TO_ID] or -r FROM_ID -r TO_ID. In both cases the
46              option expects IDs which resolve to commits and will include the
47              specified IDs. If TO_ID is omitted all commits from FROM_ID to
48              the initial commit is shown. If no revisions is specified, the
49              log information starting from HEAD will be shown.
50
51       -D DATE
52              Limit the log information to revisions newer than given DATE,
53              and on second time further restrain it to revisions older than
54              given date. Therefore, -D "2 days ago" -D "yesterday" will show
55              all the commits from the day before yesterday.
56
57       -m     End the log listing at the merge base of the -r arguments
58              (defaulting to HEAD and origin).
59
60       -M, --merges
61              Display merge commits in the log.
62
63       -R, --no-renames
64              This flag is currently no-op.  cg-log(1) will not follow file
65              history across renames.
66
67       -s     Show the log entries one per line. The entry summary contains
68              information about the commit date, the author, the first line of
69              the commit log and the commit ID. Long author names and commit
70              IDs are trimmed and marked with an ending tilde (~).
71
72       --summary
73              Generate the changes summary, listing the commit titles grouped
74              by their author. This is also known as a "shortlog", suitable
75              e.g. for contribution summaries of announcements.
76
77       -S, --pickaxe STRING
78              List only commits with changes concerning STRING (also known as
79              pick-axe). In other words, only commits where the parent
80              contains STRING and the child does not contain it at the same
81              place in a file or vice versa are shown. The STRING may contain
82              any special characters or even newlines (but you might need to
83              quote it properly when calling cg-log(1) from a shell). It is
84              matched verbatim.
85
86       -u USERNAME
87              List only commits where author or committer contains USERNAME.
88              The search for USERNAME is case-insensitive.
89
90       -v     By default, only the commit and author headers are shown. This
91              makes cg-log(1) show even the other commit headers - tree,
92              parent, and committer.
93
94       -h, --help
95              Print usage summary.
96
97       --long-help
98              Print user manual. The same as found in cg-log(1).
99

ENVIRONMENT VARIABLES

101       PAGER  The pager to display log information in, defaults to less.
102
103       PAGER_FLAGS
104              Flags to pass to the pager.
105
106       CG_COLORS
107              Colon-separated list of name=color pairs, where name is one of
108              logcommit, logheader, logauthor, logcommitter, logfilemod,
109              logfileadd, logfiledel, logfileren, logsignoff, logsumauthor,
110              logsumtrim, logsumcommit, logsumdate, default, and value is an
111              ECMA-48 SGR sequence (see e.g. console_codes(4)). You can also
112              customize the diff colors; see cg-diff(1) documentation for the
113              appropriate color names.
114
115       CG_COLORS_AUTO
116              Even if -c was passed or specified in ~/.cgrc, if this option is
117              set, use colors only when the output is a terminal and it
118              supports colors.
119
120       CG_LESS
121              This is what the $LESS environment variable value will be set to
122              before invoking $PAGER. It defaults to $LESS concatenated with
123              the R and S flags to allow displaying of colorized output and to
124              avoid long lines from wrapping when using -s.
125

CONFIGURATION VARIABLES

127       The following GIT configuration file variables are recognized:
128
129
130       log.usecolor
131              If enabled, colorify the output like with -c if the output is a
132              terminal.
133

EXAMPLE USAGE

135       To show a log of changes between two releases tagged as releasetag-0.9
136       and releasetag-0.10 do:
137
138
139       $ cg-log -r releasetag-0.9..releasetag-0.10
140       Similarily, to see which commits are in branch A but not in branch B,
141
142
143       $ cg-log -r B..A
144       (meaning "all the commits which newly appear along the way from B to
145       A").
146
147       If you see a dubious "if (current->uid = 0)" test in a file and wonder
148       about its genesis, you can run
149
150
151       $ cg-log -d -S "if (current->uid = 0)" filename
152       to show the commits adding, removing or modifying that string, together
153       with the relevant patches (you can obviously refrain from limiting the
154       pick-axe to a particular file, but it will make it significantly
155       slower).
156
157

NOTES

159       The : is equivalent to .. in revisions range specification (to make
160       things more comfortable to SVN users). See cogito(7) for more details
161       about revision specification.
162
163
165       Copyright © Petr Baudis, 2005. Copyright © David Woodhouse, 2005.
166
167

SEE ALSO

169       cg-log is part of cogito(7), a toolkit for managing git(7) trees.
170
171
172
173
174                                  12/11/2006                         CG-LOG(1)
Impressum