Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1 | git-rev-list(1) |
| 2 | =============== |
| 3 | |
| 4 | NAME |
| 5 | ---- |
| 6 | git-rev-list - Lists commit objects in reverse chronological order |
| 7 | |
| 8 | |
| 9 | SYNOPSIS |
| 10 | -------- |
Junio C Hamano | 235a91e | 2006-01-07 01:13:58 | [diff] [blame] | 11 | [verse] |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 12 | 'git-rev-list' [ \--max-count=number ] |
Junio C Hamano | 235a91e | 2006-01-07 01:13:58 | [diff] [blame] | 13 | [ \--max-age=timestamp ] |
| 14 | [ \--min-age=timestamp ] |
| 15 | [ \--sparse ] |
| 16 | [ \--no-merges ] |
Junio C Hamano | 9be1897 | 2006-01-28 08:54:57 | [diff] [blame] | 17 | [ \--remove-empty ] |
Junio C Hamano | 872c568 | 2006-07-07 06:05:40 | [diff] [blame] | 18 | [ \--not ] |
Junio C Hamano | 235a91e | 2006-01-07 01:13:58 | [diff] [blame] | 19 | [ \--all ] |
Junio C Hamano | decf50e | 2006-03-05 10:51:14 | [diff] [blame] | 20 | [ \--topo-order ] |
Junio C Hamano | 235a91e | 2006-01-07 01:13:58 | [diff] [blame] | 21 | [ \--parents ] |
Junio C Hamano | 5f32776 | 2006-03-02 09:14:51 | [diff] [blame] | 22 | [ [\--objects | \--objects-edge] [ \--unpacked ] ] |
Junio C Hamano | 235a91e | 2006-01-07 01:13:58 | [diff] [blame] | 23 | [ \--pretty | \--header ] |
| 24 | [ \--bisect ] |
Junio C Hamano | 859f3b4 | 2006-08-04 10:04:30 | [diff] [blame^] | 25 | [ \--merge ] |
Junio C Hamano | 235a91e | 2006-01-07 01:13:58 | [diff] [blame] | 26 | <commit>... [ \-- <paths>... ] |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 27 | |
| 28 | DESCRIPTION |
| 29 | ----------- |
| 30 | Lists commit objects in reverse chronological order starting at the |
| 31 | given commit(s), taking ancestry relationship into account. This is |
| 32 | useful to produce human-readable log output. |
| 33 | |
| 34 | Commits which are stated with a preceding '{caret}' cause listing to stop at |
| 35 | that point. Their parents are implied. "git-rev-list foo bar {caret}baz" thus |
| 36 | means "list all the commits which are included in 'foo' and 'bar', but |
| 37 | not in 'baz'". |
| 38 | |
| 39 | A special notation <commit1>..<commit2> can be used as a |
| 40 | short-hand for {caret}<commit1> <commit2>. |
| 41 | |
Junio C Hamano | 872c568 | 2006-07-07 06:05:40 | [diff] [blame] | 42 | Another special notation is <commit1>...<commit2> which is useful for |
| 43 | merges. The resulting set of commits is the symmetric difference |
| 44 | between the two operands. The following two commands are equivalent: |
| 45 | |
| 46 | ------------ |
| 47 | $ git-rev-list A B --not $(git-merge-base --all A B) |
| 48 | $ git-rev-list A...B |
| 49 | ------------ |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 50 | |
| 51 | OPTIONS |
| 52 | ------- |
| 53 | --pretty:: |
| 54 | Print the contents of the commit changesets in human-readable form. |
| 55 | |
| 56 | --header:: |
| 57 | Print the contents of the commit in raw-format; each |
| 58 | record is separated with a NUL character. |
| 59 | |
Junio C Hamano | 7ccb9fd | 2006-07-15 01:38:40 | [diff] [blame] | 60 | --parents:: |
| 61 | Print the parents of the commit. |
| 62 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 63 | --objects:: |
| 64 | Print the object IDs of any object referenced by the listed commits. |
| 65 | 'git-rev-list --objects foo ^bar' thus means "send me all object IDs |
| 66 | which I need to download if I have the commit object 'bar', but |
| 67 | not 'foo'". |
| 68 | |
Junio C Hamano | 5f32776 | 2006-03-02 09:14:51 | [diff] [blame] | 69 | --objects-edge:: |
| 70 | Similar to `--objects`, but also print the IDs of |
Junio C Hamano | 51c2ab0 | 2006-07-09 20:38:54 | [diff] [blame] | 71 | excluded commits prefixed with a `-` character. This is |
Junio C Hamano | 5f32776 | 2006-03-02 09:14:51 | [diff] [blame] | 72 | used by `git-pack-objects` to build 'thin' pack, which |
| 73 | records objects in deltified form based on objects |
| 74 | contained in these excluded commits to reduce network |
| 75 | traffic. |
| 76 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 77 | --unpacked:: |
| 78 | Only useful with `--objects`; print the object IDs that |
| 79 | are not in packs. |
| 80 | |
| 81 | --bisect:: |
| 82 | Limit output to the one commit object which is roughly halfway |
| 83 | between the included and excluded commits. Thus, if 'git-rev-list |
Junio C Hamano | b0ec2db | 2006-05-09 00:32:32 | [diff] [blame] | 84 | --bisect foo {caret}bar {caret}baz' outputs 'midpoint', the output |
| 85 | of 'git-rev-list foo {caret}midpoint' and 'git-rev-list midpoint |
| 86 | {caret}bar {caret}baz' would be of roughly the same length. |
| 87 | Finding the change |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 88 | which introduces a regression is thus reduced to a binary search: |
| 89 | repeatedly generate and test new 'midpoint's until the commit chain |
| 90 | is of length one. |
| 91 | |
| 92 | --max-count:: |
| 93 | Limit the number of commits output. |
| 94 | |
| 95 | --max-age=timestamp, --min-age=timestamp:: |
| 96 | Limit the commits output to specified time range. |
| 97 | |
| 98 | --sparse:: |
| 99 | When optional paths are given, the command outputs only |
| 100 | the commits that changes at least one of them, and also |
| 101 | ignores merges that do not touch the given paths. This |
| 102 | flag makes the command output all eligible commits |
| 103 | (still subject to count and age limitation), but apply |
| 104 | merge simplification nevertheless. |
| 105 | |
Junio C Hamano | 9be1897 | 2006-01-28 08:54:57 | [diff] [blame] | 106 | --remove-empty:: |
| 107 | Stop when a given path disappears from the tree. |
| 108 | |
Junio C Hamano | 7ccb9fd | 2006-07-15 01:38:40 | [diff] [blame] | 109 | --no-merges:: |
| 110 | Do not print commits with more than one parent. |
| 111 | |
Junio C Hamano | 872c568 | 2006-07-07 06:05:40 | [diff] [blame] | 112 | --not:: |
| 113 | Reverses the meaning of the '{caret}' prefix (or lack |
| 114 | thereof) for all following revision specifiers, up to |
| 115 | the next `--not`. |
| 116 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 117 | --all:: |
| 118 | Pretend as if all the refs in `$GIT_DIR/refs/` are |
| 119 | listed on the command line as <commit>. |
| 120 | |
| 121 | --topo-order:: |
| 122 | By default, the commits are shown in reverse |
| 123 | chronological order. This option makes them appear in |
| 124 | topological order (i.e. descendant commits are shown |
| 125 | before their parents). |
| 126 | |
Junio C Hamano | 859f3b4 | 2006-08-04 10:04:30 | [diff] [blame^] | 127 | --merge:: |
| 128 | After a failed merge, show refs that touch files having a |
| 129 | conflict and don't exist on all heads to merge. |
| 130 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 131 | Author |
| 132 | ------ |
| 133 | Written by Linus Torvalds <torvalds@osdl.org> |
| 134 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 135 | Documentation |
| 136 | -------------- |
| 137 | Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>. |
| 138 | |
| 139 | GIT |
| 140 | --- |
| 141 | Part of the gitlink:git[7] suite |
| 142 | |