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