1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.1//EN"
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml" xml:
lang=
"en">
5 <meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8" />
6 <meta name=
"generator" content=
"AsciiDoc 8.4.5" />
7 <title>git-whatchanged(
1)
</title>
8 <style type=
"text/css">
10 p
, li
, dt
, dd
, div
, pre
, h1
, h2
, h3
, h4
, h5
, h6
{
12 border: 1px solid red;
17 margin: 1em 5% 1em 5%;
22 text-decoration: underline
;
42 h1
, h2
, h3
, h4
, h5
, h6
{
44 font-family: sans-serif
;
51 border-bottom: 2px solid silver
;
69 border: 1px solid silver
;
88 font-family: sans-serif
;
94 span#revnumber
, span#revdate
, span#revremark
{
95 font-family: sans-serif
;
99 font-family: sans-serif
;
101 border-top: 2px solid silver
;
107 padding-bottom: 0.5em;
111 padding-bottom: 0.5em;
116 margin-bottom: 1.5em;
118 div
.tableblock
, div
.imageblock
, div
.exampleblock
, div
.verseblock
,
119 div
.quoteblock
, div
.literalblock
, div
.listingblock
, div
.sidebarblock
,
120 div
.admonitionblock
{
122 margin-bottom: 1.5em;
124 div
.admonitionblock
{
126 margin-bottom: 2.5em;
129 div
.content
{ /* Block element content. */
133 /* Block element titles. */
134 div
.title
, caption
.title
{
136 font-family: sans-serif
;
140 margin-bottom: 0.5em;
146 td div
.title:first-child
{
149 div
.content div
.title:first-child
{
152 div
.content
+ div
.title
{
156 div
.sidebarblock
> div
.content
{
158 border: 1px solid silver
;
162 div
.listingblock
> div
.content
{
163 border: 1px solid silver
;
172 div
.quoteblock
> div
.attribution
{
181 div
.verseblock
> div
.content
{
184 div
.verseblock
> div
.attribution
{
188 /* DEPRECATED: Pre version 8.2.7 verse style literal block. */
189 div
.verseblock
+ div
.attribution
{
193 div
.admonitionblock
.icon
{
197 text-decoration: underline
;
199 padding-right: 0.5em;
201 div
.admonitionblock td
.content
{
203 border-left: 2px solid silver
;
206 div
.exampleblock
> div
.content
{
207 border-left: 2px solid silver
;
211 div
.imageblock div
.content
{ padding-left: 0; }
212 span
.image img
{ border-style: none
; }
213 a
.image:visited
{ color: white
; }
217 margin-bottom: 0.8em;
230 list-style-position: outside
;
233 list-style-type: decimal
;
236 list-style-type: lower-alpha
;
239 list-style-type: upper-alpha
;
242 list-style-type: lower-roman
;
245 list-style-type: upper-roman
;
248 div
.compact ul
, div
.compact ol
,
249 div
.compact p
, div
.compact p
,
250 div
.compact div
, div
.compact div
{
252 margin-bottom: 0.1em;
255 div
.tableblock
> table
{
256 border: 3px solid
#527bbd;
259 font-family: sans-serif
;
271 /* Because the table frame attribute is overriden by CSS in most browsers. */
272 div
.tableblock
> table
[frame
="void"] {
275 div
.tableblock
> table
[frame
="hsides"] {
276 border-left-style: none
;
277 border-right-style: none
;
279 div
.tableblock
> table
[frame
="vsides"] {
280 border-top-style: none
;
281 border-bottom-style: none
;
287 margin-bottom: 0.8em;
290 padding-bottom: 15px;
292 dt
.hdlist1
.strong
, td
.hdlist1
.strong
{
298 padding-right: 0.8em;
304 div
.hdlist
.compact tr
{
314 div#footer-badges
{ display: none
; }
319 font-family: sans-serif
;
323 margin-bottom: 0.1em;
326 div
.toclevel1
, div
.toclevel2
, div
.toclevel3
, div
.toclevel4
{
342 /* Overrides for manpage documents */
345 padding-bottom: 0.5em;
346 border-top: 2px solid silver
;
347 border-bottom: 2px solid silver
;
357 div#toc
{ display: none
; }
360 /* Workarounds for IE6's broken and incomplete CSS2. */
362 div
.sidebar-content
{
364 border: 1px solid silver
;
367 div
.sidebar-title
, div
.image-title
{
369 font-family: sans-serif
;
372 margin-bottom: 0.5em;
375 div
.listingblock div
.content
{
376 border: 1px solid silver
;
381 div
.quoteblock-attribution
{
386 div
.verseblock-content
{
389 div
.verseblock-attribution
{
394 div
.exampleblock-content
{
395 border-left: 2px solid silver
;
399 /* IE6 sets dynamically generated links as visited. */
400 div#toc
a:visited
{ color: blue
; }
406 git-whatchanged(
1) Manual Page
409 <div class=
"sectionbody">
411 Show logs with difference each commit introduces
415 <h2 id=
"_synopsis">SYNOPSIS
</h2>
416 <div class=
"sectionbody">
417 <div class=
"paragraph"><p><em>git whatchanged
</em> <option
>…</p></div>
419 <h2 id=
"_description">DESCRIPTION
</h2>
420 <div class=
"sectionbody">
421 <div class=
"paragraph"><p>Shows commit logs and diff output each commit introduces. The
422 command internally invokes
<em>git rev-list
</em> piped to
423 <em>git diff-tree
</em>, and takes command line options for both of
424 these commands.
</p></div>
425 <div class=
"paragraph"><p>This manual page describes only the most frequently used options.
</p></div>
427 <h2 id=
"_options">OPTIONS
</h2>
428 <div class=
"sectionbody">
429 <div class=
"dlist"><dl>
435 Show textual diffs, instead of the git internal diff
436 output format that is useful only to tell the changed
437 paths and their nature of changes.
445 Limit output to
<n
> commits.
449 <since
>..
<until
>
453 Limit output to between the two named commits (bottom
454 exclusive, top inclusive).
462 Show git internal diff output, but for the whole tree,
463 not just the top level.
471 By default, differences for merge commits are not shown.
472 With this flag, show differences to that commit from all
475 <div class=
"paragraph"><p>However, it is not very useful in general, although it
476 <strong>is
</strong> useful on a file-by-file basis.
</p></div>
479 --pretty[=
<format
>]
482 --format=
<format
>
486 Pretty-print the contents of the commit logs in a given format,
487 where
<em><format
></em> can be one of
<em>oneline
</em>,
<em>short
</em>,
<em>medium
</em>,
488 <em>full
</em>,
<em>fuller
</em>,
<em>email
</em>,
<em>raw
</em> and
<em>format:
<string
></em>. See
489 the
"PRETTY FORMATS" section for some additional details for each
490 format. When omitted, the format defaults to
<em>medium
</em>.
492 <div class=
"paragraph"><p>Note: you can specify the default pretty format in the repository
493 configuration (see
<a href=
"git-config.html">git-config(
1)
</a>).
</p></div>
500 Instead of showing the full
40-byte hexadecimal commit object
501 name, show only a partial prefix. Non default number of
502 digits can be specified with
"--abbrev=<n>" (which also modifies
503 diff output, if it is displayed).
505 <div class=
"paragraph"><p>This should make
"--pretty=oneline" a whole lot more readable for
506 people using
80-column terminals.
</p></div>
513 This is a shorthand for
"--pretty=oneline --abbrev-commit"
518 --encoding[=
<encoding
>]
522 The commit objects record the encoding used for the log message
523 in their encoding header; this option can be used to tell the
524 command to re-code the commit log message in the encoding
525 preferred by the user. For non plumbing commands this
530 --notes[=
<ref
>]
534 Show the notes (see
<a href=
"git-notes.html">git-notes(
1)
</a>) that annotate the
535 commit, when showing the commit log message. This is the default
536 for
<tt>git log
</tt>,
<tt>git show
</tt> and
<tt>git whatchanged
</tt> commands when
537 there is no
<tt>--pretty
</tt>,
<tt>--format
</tt> nor
<tt>--oneline
</tt> option given
540 <div class=
"paragraph"><p>By default, the notes shown are from the notes refs listed in the
541 <em>core.notesRef
</em> and
<em>notes.displayRef
</em> variables (or corresponding
542 environment overrides). See
<a href=
"git-config.html">git-config(
1)
</a> for more details.
</p></div>
543 <div class=
"paragraph"><p>With an optional
<em><ref
></em> argument, show this notes ref instead of the
544 default notes ref(s). The ref is taken to be in
<tt>refs/notes/
</tt> if it
545 is not qualified.
</p></div>
546 <div class=
"paragraph"><p>Multiple --notes options can be combined to control which notes are
547 being displayed. Examples:
"--notes=foo" will show only notes from
548 "refs/notes/foo";
"--notes=foo --notes" will show both notes from
549 "refs/notes/foo" and from the default notes ref(s).
</p></div>
556 Do not show notes. This negates the above
<tt>--notes
</tt> option, by
557 resetting the list of notes refs from which notes are shown.
558 Options are parsed in the order given on the command line, so e.g.
559 "--notes --notes=foo --no-notes --notes=bar" will only show notes
560 from
"refs/notes/bar".
564 --show-notes[=
<ref
>]
567 --[no-]standard-notes
571 These options are deprecated. Use the above --notes/--no-notes
577 <h2 id=
"_pretty_formats">PRETTY FORMATS
</h2>
578 <div class=
"sectionbody">
579 <div class=
"paragraph"><p>If the commit is a merge, and if the pretty-format
580 is not
<em>oneline
</em>,
<em>email
</em> or
<em>raw
</em>, an additional line is
581 inserted before the
<em>Author:
</em> line. This line begins with
582 "Merge: " and the sha1s of ancestral commits are printed,
583 separated by spaces. Note that the listed commits may not
584 necessarily be the list of the
<strong>direct
</strong> parent commits if you
585 have limited your view of history: for example, if you are
586 only interested in changes related to a certain directory or
588 <div class=
"paragraph"><p>There are several built-in formats, and you can define
589 additional formats by setting a pretty.
<name
>
590 config option to either another format name, or a
591 <em>format:
</em> string, as described below (see
592 <a href=
"git-config.html">git-config(
1)
</a>). Here are the details of the
593 built-in formats:
</p></div>
594 <div class=
"ulist"><ul>
599 <div class=
"literalblock">
600 <div class=
"content">
601 <pre><tt><sha1
> <title line
></tt></pre>
603 <div class=
"paragraph"><p>This is designed to be as compact as possible.
</p></div>
609 <div class=
"literalblock">
610 <div class=
"content">
611 <pre><tt>commit
<sha1
>
612 Author:
<author
></tt></pre>
614 <div class=
"literalblock">
615 <div class=
"content">
616 <pre><tt><title line
></tt></pre>
623 <div class=
"literalblock">
624 <div class=
"content">
625 <pre><tt>commit
<sha1
>
626 Author:
<author
>
627 Date:
<author date
></tt></pre>
629 <div class=
"literalblock">
630 <div class=
"content">
631 <pre><tt><title line
></tt></pre>
633 <div class=
"literalblock">
634 <div class=
"content">
635 <pre><tt><full commit message
></tt></pre>
642 <div class=
"literalblock">
643 <div class=
"content">
644 <pre><tt>commit
<sha1
>
645 Author:
<author
>
646 Commit:
<committer
></tt></pre>
648 <div class=
"literalblock">
649 <div class=
"content">
650 <pre><tt><title line
></tt></pre>
652 <div class=
"literalblock">
653 <div class=
"content">
654 <pre><tt><full commit message
></tt></pre>
661 <div class=
"literalblock">
662 <div class=
"content">
663 <pre><tt>commit
<sha1
>
664 Author:
<author
>
665 AuthorDate:
<author date
>
666 Commit:
<committer
>
667 CommitDate:
<committer date
></tt></pre>
669 <div class=
"literalblock">
670 <div class=
"content">
671 <pre><tt><title line
></tt></pre>
673 <div class=
"literalblock">
674 <div class=
"content">
675 <pre><tt><full commit message
></tt></pre>
682 <div class=
"literalblock">
683 <div class=
"content">
684 <pre><tt>From
<sha1
> <date
>
686 Date:
<author date
>
687 Subject: [PATCH]
<title line
></tt></pre>
689 <div class=
"literalblock">
690 <div class=
"content">
691 <pre><tt><full commit message
></tt></pre>
698 <div class=
"paragraph"><p>The
<em>raw
</em> format shows the entire commit exactly as
699 stored in the commit object. Notably, the SHA1s are
700 displayed in full, regardless of whether --abbrev or
701 --no-abbrev are used, and
<em>parents
</em> information show the
702 true parent commits, without taking grafts nor history
703 simplification into account.
</p></div>
707 <em>format:
<string
></em>
709 <div class=
"paragraph"><p>The
<em>format:
<string
></em> format allows you to specify which information
710 you want to show. It works a little bit like printf format,
711 with the notable exception that you get a newline with
<em>%n
</em>
712 instead of
<em>\n
</em>.
</p></div>
713 <div class=
"paragraph"><p>E.g,
<em>format:
"The author of %h was %an, %ar%nThe title was >>%s<<%n"</em>
714 would show something like this:
</p></div>
715 <div class=
"listingblock">
716 <div class=
"content">
717 <pre><tt>The author of fe6e0ee was Junio C Hamano,
23 hours ago
718 The title was
>>t4119: test autocomputing -p
<n
> for traditional diff input.
<<</tt></pre>
720 <div class=
"paragraph"><p>The placeholders are:
</p></div>
721 <div class=
"ulist"><ul>
724 <em>%H
</em>: commit hash
729 <em>%h
</em>: abbreviated commit hash
734 <em>%T
</em>: tree hash
739 <em>%t
</em>: abbreviated tree hash
744 <em>%P
</em>: parent hashes
749 <em>%p
</em>: abbreviated parent hashes
754 <em>%an
</em>: author name
759 <em>%aN
</em>: author name (respecting .mailmap, see
<a href=
"git-shortlog.html">git-shortlog(
1)
</a> or
<a href=
"git-blame.html">git-blame(
1)
</a>)
764 <em>%ae
</em>: author email
769 <em>%aE
</em>: author email (respecting .mailmap, see
<a href=
"git-shortlog.html">git-shortlog(
1)
</a> or
<a href=
"git-blame.html">git-blame(
1)
</a>)
774 <em>%ad
</em>: author date (format respects --date= option)
779 <em>%aD
</em>: author date, RFC2822 style
784 <em>%ar
</em>: author date, relative
789 <em>%at
</em>: author date, UNIX timestamp
794 <em>%ai
</em>: author date, ISO
8601 format
799 <em>%cn
</em>: committer name
804 <em>%cN
</em>: committer name (respecting .mailmap, see
<a href=
"git-shortlog.html">git-shortlog(
1)
</a> or
<a href=
"git-blame.html">git-blame(
1)
</a>)
809 <em>%ce
</em>: committer email
814 <em>%cE
</em>: committer email (respecting .mailmap, see
<a href=
"git-shortlog.html">git-shortlog(
1)
</a> or
<a href=
"git-blame.html">git-blame(
1)
</a>)
819 <em>%cd
</em>: committer date
824 <em>%cD
</em>: committer date, RFC2822 style
829 <em>%cr
</em>: committer date, relative
834 <em>%ct
</em>: committer date, UNIX timestamp
839 <em>%ci
</em>: committer date, ISO
8601 format
844 <em>%d
</em>: ref names, like the --decorate option of
<a href=
"git-log.html">git-log(
1)
</a>
849 <em>%e
</em>: encoding
859 <em>%f
</em>: sanitized subject line, suitable for a filename
869 <em>%B
</em>: raw body (unwrapped subject and body)
874 <em>%N
</em>: commit notes
879 <em>%gD
</em>: reflog selector, e.g.,
<tt>refs/stash@{
1}
</tt>
884 <em>%gd
</em>: shortened reflog selector, e.g.,
<tt>stash@{
1}
</tt>
889 <em>%gs
</em>: reflog subject
894 <em>%Cred
</em>: switch color to red
899 <em>%Cgreen
</em>: switch color to green
904 <em>%Cblue
</em>: switch color to blue
909 <em>%Creset
</em>: reset color
914 <em>%C(
…)
</em>: color specification, as described in color.branch.* config option
919 <em>%m
</em>: left, right or boundary mark
929 <em>%%
</em>: a raw
<em>%
</em>
934 <em>%x00
</em>: print a byte from a hex code
939 <em>%w([
<w
>[,
<i1
>[,
<i2
>]]])
</em>: switch line wrapping, like the -w option of
940 <a href=
"git-shortlog.html">git-shortlog(
1)
</a>.
946 <div class=
"admonitionblock">
949 <div class=
"title">Note
</div>
951 <td class=
"content">Some placeholders may depend on other options given to the
952 revision traversal engine. For example, the
<tt>%g*
</tt> reflog options will
953 insert an empty string unless we are traversing reflog entries (e.g., by
954 <tt>git log -g
</tt>). The
<tt>%d
</tt> placeholder will use the
"short" decoration
955 format if
<tt>--decorate
</tt> was not already provided on the command line.
</td>
958 <div class=
"paragraph"><p>If you add a
<tt>+</tt> (plus sign) after
<em>%
</em> of a placeholder, a line-feed
959 is inserted immediately before the expansion if and only if the
960 placeholder expands to a non-empty string.
</p></div>
961 <div class=
"paragraph"><p>If you add a
<tt>-
</tt> (minus sign) after
<em>%
</em> of a placeholder, line-feeds that
962 immediately precede the expansion are deleted if and only if the
963 placeholder expands to an empty string.
</p></div>
964 <div class=
"paragraph"><p>If you add a ` ` (space) after
<em>%
</em> of a placeholder, a space
965 is inserted immediately before the expansion if and only if the
966 placeholder expands to a non-empty string.
</p></div>
967 <div class=
"ulist"><ul>
972 <div class=
"paragraph"><p>The
<em>tformat:
</em> format works exactly like
<em>format:
</em>, except that it
973 provides
"terminator" semantics instead of
"separator" semantics. In
974 other words, each commit has the message terminator character (usually a
975 newline) appended, rather than a separator placed between entries.
976 This means that the final entry of a single-line format will be properly
977 terminated with a new line, just as the
"oneline" format does.
978 For example:
</p></div>
979 <div class=
"listingblock">
980 <div class=
"content">
981 <pre><tt>$ git log -
2 --pretty=format:%h
4da45bef \
982 | perl -pe '$_ .=
" -- NO NEWLINE\n" unless /\n/'
984 7134973 -- NO NEWLINE
986 $ git log -
2 --pretty=tformat:%h
4da45bef \
987 | perl -pe '$_ .=
" -- NO NEWLINE\n" unless /\n/'
991 <div class=
"paragraph"><p>In addition, any unrecognized string that has a
<tt>%
</tt> in it is interpreted
992 as if it has
<tt>tformat:
</tt> in front of it. For example, these two are
993 equivalent:
</p></div>
994 <div class=
"listingblock">
995 <div class=
"content">
996 <pre><tt>$ git log -
2 --pretty=tformat:%h
4da45bef
997 $ git log -
2 --pretty=%h
4da45bef
</tt></pre>
1002 <h2 id=
"_examples">Examples
</h2>
1003 <div class=
"sectionbody">
1004 <div class=
"dlist"><dl>
1005 <dt class=
"hdlist1">
1006 git whatchanged -p v2.6
.12.. include/scsi drivers/scsi
1010 Show as patches the commits since version
<em>v2.6
.12</em> that changed
1011 any file in the include/scsi or drivers/scsi subdirectories
1014 <dt class=
"hdlist1">
1015 git whatchanged
--since=
"2 weeks ago" -- gitk
1019 Show the changes during the last two weeks to the file
<em>gitk
</em>.
1020 The
"--" is necessary to avoid confusion with the
<strong>branch
</strong> named
1026 <h2 id=
"_git">GIT
</h2>
1027 <div class=
"sectionbody">
1028 <div class=
"paragraph"><p>Part of the
<a href=
"git.html">git(
1)
</a> suite
</p></div>
1031 <div id=
"footer-text">
1032 Last updated
2011-
03-
15 23:
30:
15 UTC