@matheusbsbs / matheus-bagliano / commits / 69e0c25641
Fork 0

Update usage string and documentation for git-rev-list.

Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Oct 30, 2005 at 01:03 UTC 69e0c256415a98cd683d977386e624f034643829
2 files changed +70 -17
Documentation/git-rev-list.txt
+51 -4
@@ -8,7 +8,18 @@ git-rev-list - Lists commit objects in reverse chronological order
8
9 SYNOPSIS
10 --------
11 -'git-rev-list' [ *--max-count*=number ] [ *--max-age*=timestamp ] [ *--min-age*=timestamp ] [ *--bisect* ] [ *--pretty* ] [ *--objects* ] [ *--merge-order* [ *--show-breaks* ] ] <commit> [ <commit> ...] [ ^<commit> ...]
11 +'git-rev-list' [ \--max-count=number ]
12 + [ \--max-age=timestamp ]
13 + [ \--min-age=timestamp ]
14 + [ \--sparse ]
15 + [ \--no-merges ]
16 + [ \--all ]
17 + [ [ \--merge-order [ \--show-breaks ] ] | [ \--topo-order ] | ]
18 + [ \--parents ]
19 + [ \--objects [ \--unpacked ] ]
20 + [ \--pretty | \--header | ]
21 + [ \--bisect ]
22 + <commit>... [ \-- <paths>... ]
23
24 DESCRIPTION
25 -----------
@@ -16,22 +27,34 @@ Lists commit objects in reverse chronological order starting at the
27 given commit(s), taking ancestry relationship into account. This is
28 useful to produce human-readable log output.
29
19 -Commits which are stated with a preceding '^' cause listing to stop at
20 -that point. Their parents are implied. "git-rev-list foo bar ^baz" thus
30 +Commits which are stated with a preceding '{caret}' cause listing to stop at
31 +that point. Their parents are implied. "git-rev-list foo bar {caret}baz" thus
32 means "list all the commits which are included in 'foo' and 'bar', but
33 not in 'baz'".
34
35 +A special notation <commit1>..<commit2> can be used as a
36 +short-hand for {caret}<commit1> <commit2>.
37 +
38 +
39 OPTIONS
40 -------
41 --pretty::
42 Print the contents of the commit changesets in human-readable form.
43
44 +--header::
45 + Print the contents of the commit in raw-format; each
46 + record is separated with a NUL character.
47 +
48 --objects::
49 Print the object IDs of any object referenced by the listed commits.
50 'git-rev-list --objects foo ^bar' thus means "send me all object IDs
51 which I need to download if I have the commit object 'bar', but
52 not 'foo'".
53
54 +--unpacked::
55 + Only useful with `--objects`; print the object IDs that
56 + are not in packs.
57 +
58 --bisect::
59 Limit output to the one commit object which is roughly halfway
60 between the included and excluded commits. Thus, if 'git-rev-list
@@ -42,6 +65,29 @@ OPTIONS
65 repeatedly generate and test new 'midpoint's until the commit chain
66 is of length one.
67
68 +--max-count::
69 + Limit the number of commits output.
70 +
71 +--max-age=timestamp, --min-age=timestamp::
72 + Limit the commits output to specified time range.
73 +
74 +--sparse::
75 + When optional paths are given, the command outputs only
76 + the commits that changes at least one of them. This
77 + flag makes the command ignore the paths, outputting all
78 + eligible commits (still subject to count and age
79 + limitation).
80 +
81 +--all::
82 + Pretend as if all the refs in `$GIT_DIR/refs/` are
83 + listed on the command line as <commit>.
84 +
85 +--topo-order::
86 + By default, the commits are shown in reverse
87 + chronological order. This option makes them appear in
88 + topological order (i.e. descendant commits are shown
89 + before their parents).
90 +
91 --merge-order::
92 When specified the commit history is decomposed into a unique
93 sequence of minimal, non-linear epochs and maximal, linear epochs.
@@ -84,7 +130,8 @@ Commits marked with (^) are not parents of the immediately preceding commit.
130 These "breaks" represent necessary discontinuities implied by trying to
131 represent an arbtirary DAG in a linear form.
132 +
87 -*--show-breaks* is only valid if *--merge-order* is also specified.
133 +`--show-breaks` is only valid if `--merge-order` is also specified.
134 +
135
136 Author
137 ------
rev-list.c
+19 -13
@@ -14,19 +14,25 @@
14 #define TREECHANGE (1u << 4)
15
16 static const char rev_list_usage[] =
17 - "git-rev-list [OPTION] commit-id <commit-id>\n"
18 - " --max-count=nr\n"
19 - " --max-age=epoch\n"
20 - " --min-age=epoch\n"
21 - " --parents\n"
22 - " --bisect\n"
23 - " --objects\n"
24 - " --unpacked\n"
25 - " --header\n"
26 - " --pretty\n"
27 - " --no-merges\n"
28 - " --merge-order [ --show-breaks ]\n"
29 - " --topo-order";
17 +"git-rev-list [OPTION] <commit-id>... [ -- paths... ]\n"
18 +" limiting output:\n"
19 +" --max-count=nr\n"
20 +" --max-age=epoch\n"
21 +" --min-age=epoch\n"
22 +" --sparse\n"
23 +" --no-merges\n"
24 +" --all\n"
25 +" ordering output:\n"
26 +" --merge-order [ --show-breaks ]\n"
27 +" --topo-order\n"
28 +" formatting output:\n"
29 +" --parents\n"
30 +" --objects\n"
31 +" --unpacked\n"
32 +" --header | --pretty\n"
33 +" special purpose:\n"
34 +" --bisect"
35 +;
36
37 static int dense = 1;
38 static int unpacked = 0;