|
1 |
| -Commit Formatting |
2 |
| -~~~~~~~~~~~~~~~~~ |
3 |
| - |
4 |
| -ifdef::git-rev-list[] |
5 |
| -Using these options, linkgit:git-rev-list[1] will act similar to the |
6 |
| -more specialized family of commit log tools: linkgit:git-log[1], |
7 |
| -linkgit:git-show[1], and linkgit:git-whatchanged[1] |
8 |
| -endif::git-rev-list[] |
9 |
| - |
10 |
| -include::pretty-options.txt[] |
11 |
| - |
12 |
| ---relative-date:: |
13 |
| - |
14 |
| - Synonym for `--date=relative`. |
15 |
| - |
16 |
| ---date=(relative|local|default|iso|rfc|short|raw):: |
17 |
| - |
18 |
| - Only takes effect for dates shown in human-readable format, such |
19 |
| - as when using "--pretty". `log.date` config variable sets a default |
20 |
| - value for log command's --date option. |
21 |
| -+ |
22 |
| -`--date=relative` shows dates relative to the current time, |
23 |
| -e.g. "2 hours ago". |
24 |
| -+ |
25 |
| -`--date=local` shows timestamps in user's local timezone. |
26 |
| -+ |
27 |
| -`--date=iso` (or `--date=iso8601`) shows timestamps in ISO 8601 format. |
28 |
| -+ |
29 |
| -`--date=rfc` (or `--date=rfc2822`) shows timestamps in RFC 2822 |
30 |
| -format, often found in E-mail messages. |
31 |
| -+ |
32 |
| -`--date=short` shows only date but not time, in `YYYY-MM-DD` format. |
33 |
| -+ |
34 |
| -`--date=raw` shows the date in the internal raw git format `%s %z` format. |
35 |
| -+ |
36 |
| -`--date=default` shows timestamps in the original timezone |
37 |
| -(either committer's or author's). |
38 |
| - |
39 |
| -ifdef::git-rev-list[] |
40 |
| ---header:: |
41 |
| - |
42 |
| - Print the contents of the commit in raw-format; each record is |
43 |
| - separated with a NUL character. |
44 |
| -endif::git-rev-list[] |
45 |
| - |
46 |
| ---parents:: |
47 |
| - |
48 |
| - Print also the parents of the commit (in the form "commit parent..."). |
49 |
| - Also enables parent rewriting, see 'History Simplification' below. |
50 |
| - |
51 |
| ---children:: |
52 |
| - |
53 |
| - Print also the children of the commit (in the form "commit child..."). |
54 |
| - Also enables parent rewriting, see 'History Simplification' below. |
55 |
| - |
56 |
| -ifdef::git-rev-list[] |
57 |
| ---timestamp:: |
58 |
| - Print the raw commit timestamp. |
59 |
| -endif::git-rev-list[] |
60 |
| - |
61 |
| ---left-right:: |
62 |
| - |
63 |
| - Mark which side of a symmetric diff a commit is reachable from. |
64 |
| - Commits from the left side are prefixed with `<` and those from |
65 |
| - the right with `>`. If combined with `--boundary`, those |
66 |
| - commits are prefixed with `-`. |
67 |
| -+ |
68 |
| -For example, if you have this topology: |
69 |
| -+ |
70 |
| ------------------------------------------------------------------------ |
71 |
| - y---b---b branch B |
72 |
| - / \ / |
73 |
| - / . |
74 |
| - / / \ |
75 |
| - o---x---a---a branch A |
76 |
| ------------------------------------------------------------------------ |
77 |
| -+ |
78 |
| -you would get an output like this: |
79 |
| -+ |
80 |
| ------------------------------------------------------------------------ |
81 |
| - $ git rev-list --left-right --boundary --pretty=oneline A...B |
82 |
| - |
83 |
| - >bbbbbbb... 3rd on b |
84 |
| - >bbbbbbb... 2nd on b |
85 |
| - <aaaaaaa... 3rd on a |
86 |
| - <aaaaaaa... 2nd on a |
87 |
| - -yyyyyyy... 1st on b |
88 |
| - -xxxxxxx... 1st on a |
89 |
| ------------------------------------------------------------------------ |
90 |
| - |
91 |
| ---graph:: |
92 |
| - |
93 |
| - Draw a text-based graphical representation of the commit history |
94 |
| - on the left hand side of the output. This may cause extra lines |
95 |
| - to be printed in between commits, in order for the graph history |
96 |
| - to be drawn properly. |
97 |
| -+ |
98 |
| -This enables parent rewriting, see 'History Simplification' below. |
99 |
| -+ |
100 |
| -This implies the '--topo-order' option by default, but the |
101 |
| -'--date-order' option may also be specified. |
102 |
| - |
103 |
| -ifdef::git-rev-list[] |
104 |
| ---count:: |
105 |
| - Print a number stating how many commits would have been |
106 |
| - listed, and suppress all other output. When used together |
107 |
| - with '--left-right', instead print the counts for left and |
108 |
| - right commits, separated by a tab. |
109 |
| -endif::git-rev-list[] |
110 |
| - |
111 |
| - |
112 |
| -ifndef::git-rev-list[] |
113 |
| -Diff Formatting |
114 |
| -~~~~~~~~~~~~~~~ |
115 |
| - |
116 |
| -Below are listed options that control the formatting of diff output. |
117 |
| -Some of them are specific to linkgit:git-rev-list[1], however other diff |
118 |
| -options may be given. See linkgit:git-diff-files[1] for more options. |
119 |
| - |
120 |
| --c:: |
121 |
| - |
122 |
| - With this option, diff output for a merge commit |
123 |
| - shows the differences from each of the parents to the merge result |
124 |
| - simultaneously instead of showing pairwise diff between a parent |
125 |
| - and the result one at a time. Furthermore, it lists only files |
126 |
| - which were modified from all parents. |
127 |
| - |
128 |
| ---cc:: |
129 |
| - |
130 |
| - This flag implies the '-c' options and further compresses the |
131 |
| - patch output by omitting uninteresting hunks whose contents in |
132 |
| - the parents have only two variants and the merge result picks |
133 |
| - one of them without modification. |
134 |
| - |
135 |
| --m:: |
136 |
| - |
137 |
| - This flag makes the merge commits show the full diff like |
138 |
| - regular commits; for each merge parent, a separate log entry |
139 |
| - and diff is generated. An exception is that only diff against |
140 |
| - the first parent is shown when '--first-parent' option is given; |
141 |
| - in that case, the output represents the changes the merge |
142 |
| - brought _into_ the then-current branch. |
143 |
| - |
144 |
| --r:: |
145 |
| - |
146 |
| - Show recursive diffs. |
147 |
| - |
148 |
| --t:: |
149 |
| - |
150 |
| - Show the tree objects in the diff output. This implies '-r'. |
151 |
| - |
152 |
| --s:: |
153 |
| - Suppress diff output. |
154 |
| -endif::git-rev-list[] |
155 |
| - |
156 | 1 | Commit Limiting
|
157 | 2 | ~~~~~~~~~~~~~~~
|
158 | 3 |
|
@@ -736,3 +581,158 @@ These options are mostly targeted for packing of git repositories.
|
736 | 581 | --do-walk::
|
737 | 582 |
|
738 | 583 | Overrides a previous --no-walk.
|
| 584 | + |
| 585 | +Commit Formatting |
| 586 | +~~~~~~~~~~~~~~~~~ |
| 587 | + |
| 588 | +ifdef::git-rev-list[] |
| 589 | +Using these options, linkgit:git-rev-list[1] will act similar to the |
| 590 | +more specialized family of commit log tools: linkgit:git-log[1], |
| 591 | +linkgit:git-show[1], and linkgit:git-whatchanged[1] |
| 592 | +endif::git-rev-list[] |
| 593 | + |
| 594 | +include::pretty-options.txt[] |
| 595 | + |
| 596 | +--relative-date:: |
| 597 | + |
| 598 | + Synonym for `--date=relative`. |
| 599 | + |
| 600 | +--date=(relative|local|default|iso|rfc|short|raw):: |
| 601 | + |
| 602 | + Only takes effect for dates shown in human-readable format, such |
| 603 | + as when using "--pretty". `log.date` config variable sets a default |
| 604 | + value for log command's --date option. |
| 605 | ++ |
| 606 | +`--date=relative` shows dates relative to the current time, |
| 607 | +e.g. "2 hours ago". |
| 608 | ++ |
| 609 | +`--date=local` shows timestamps in user's local timezone. |
| 610 | ++ |
| 611 | +`--date=iso` (or `--date=iso8601`) shows timestamps in ISO 8601 format. |
| 612 | ++ |
| 613 | +`--date=rfc` (or `--date=rfc2822`) shows timestamps in RFC 2822 |
| 614 | +format, often found in E-mail messages. |
| 615 | ++ |
| 616 | +`--date=short` shows only date but not time, in `YYYY-MM-DD` format. |
| 617 | ++ |
| 618 | +`--date=raw` shows the date in the internal raw git format `%s %z` format. |
| 619 | ++ |
| 620 | +`--date=default` shows timestamps in the original timezone |
| 621 | +(either committer's or author's). |
| 622 | + |
| 623 | +ifdef::git-rev-list[] |
| 624 | +--header:: |
| 625 | + |
| 626 | + Print the contents of the commit in raw-format; each record is |
| 627 | + separated with a NUL character. |
| 628 | +endif::git-rev-list[] |
| 629 | + |
| 630 | +--parents:: |
| 631 | + |
| 632 | + Print also the parents of the commit (in the form "commit parent..."). |
| 633 | + Also enables parent rewriting, see 'History Simplification' below. |
| 634 | + |
| 635 | +--children:: |
| 636 | + |
| 637 | + Print also the children of the commit (in the form "commit child..."). |
| 638 | + Also enables parent rewriting, see 'History Simplification' below. |
| 639 | + |
| 640 | +ifdef::git-rev-list[] |
| 641 | +--timestamp:: |
| 642 | + Print the raw commit timestamp. |
| 643 | +endif::git-rev-list[] |
| 644 | + |
| 645 | +--left-right:: |
| 646 | + |
| 647 | + Mark which side of a symmetric diff a commit is reachable from. |
| 648 | + Commits from the left side are prefixed with `<` and those from |
| 649 | + the right with `>`. If combined with `--boundary`, those |
| 650 | + commits are prefixed with `-`. |
| 651 | ++ |
| 652 | +For example, if you have this topology: |
| 653 | ++ |
| 654 | +----------------------------------------------------------------------- |
| 655 | + y---b---b branch B |
| 656 | + / \ / |
| 657 | + / . |
| 658 | + / / \ |
| 659 | + o---x---a---a branch A |
| 660 | +----------------------------------------------------------------------- |
| 661 | ++ |
| 662 | +you would get an output like this: |
| 663 | ++ |
| 664 | +----------------------------------------------------------------------- |
| 665 | + $ git rev-list --left-right --boundary --pretty=oneline A...B |
| 666 | + |
| 667 | + >bbbbbbb... 3rd on b |
| 668 | + >bbbbbbb... 2nd on b |
| 669 | + <aaaaaaa... 3rd on a |
| 670 | + <aaaaaaa... 2nd on a |
| 671 | + -yyyyyyy... 1st on b |
| 672 | + -xxxxxxx... 1st on a |
| 673 | +----------------------------------------------------------------------- |
| 674 | + |
| 675 | +--graph:: |
| 676 | + |
| 677 | + Draw a text-based graphical representation of the commit history |
| 678 | + on the left hand side of the output. This may cause extra lines |
| 679 | + to be printed in between commits, in order for the graph history |
| 680 | + to be drawn properly. |
| 681 | ++ |
| 682 | +This enables parent rewriting, see 'History Simplification' below. |
| 683 | ++ |
| 684 | +This implies the '--topo-order' option by default, but the |
| 685 | +'--date-order' option may also be specified. |
| 686 | + |
| 687 | +ifdef::git-rev-list[] |
| 688 | +--count:: |
| 689 | + Print a number stating how many commits would have been |
| 690 | + listed, and suppress all other output. When used together |
| 691 | + with '--left-right', instead print the counts for left and |
| 692 | + right commits, separated by a tab. |
| 693 | +endif::git-rev-list[] |
| 694 | + |
| 695 | + |
| 696 | +ifndef::git-rev-list[] |
| 697 | +Diff Formatting |
| 698 | +~~~~~~~~~~~~~~~ |
| 699 | + |
| 700 | +Below are listed options that control the formatting of diff output. |
| 701 | +Some of them are specific to linkgit:git-rev-list[1], however other diff |
| 702 | +options may be given. See linkgit:git-diff-files[1] for more options. |
| 703 | + |
| 704 | +-c:: |
| 705 | + |
| 706 | + With this option, diff output for a merge commit |
| 707 | + shows the differences from each of the parents to the merge result |
| 708 | + simultaneously instead of showing pairwise diff between a parent |
| 709 | + and the result one at a time. Furthermore, it lists only files |
| 710 | + which were modified from all parents. |
| 711 | + |
| 712 | +--cc:: |
| 713 | + |
| 714 | + This flag implies the '-c' options and further compresses the |
| 715 | + patch output by omitting uninteresting hunks whose contents in |
| 716 | + the parents have only two variants and the merge result picks |
| 717 | + one of them without modification. |
| 718 | + |
| 719 | +-m:: |
| 720 | + |
| 721 | + This flag makes the merge commits show the full diff like |
| 722 | + regular commits; for each merge parent, a separate log entry |
| 723 | + and diff is generated. An exception is that only diff against |
| 724 | + the first parent is shown when '--first-parent' option is given; |
| 725 | + in that case, the output represents the changes the merge |
| 726 | + brought _into_ the then-current branch. |
| 727 | + |
| 728 | +-r:: |
| 729 | + |
| 730 | + Show recursive diffs. |
| 731 | + |
| 732 | +-t:: |
| 733 | + |
| 734 | + Show the tree objects in the diff output. This implies '-r'. |
| 735 | + |
| 736 | +-s:: |
| 737 | + Suppress diff output. |
| 738 | +endif::git-rev-list[] |
0 commit comments