diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-04-20 13:48:39 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-04-21 01:15:33 -0700 |
commit | ebdc94f3bec7ec54babb21b1d785af0cd75b21e6 (patch) | |
tree | 777b3578254e6881a1fa45f1fc0e08283bf3288b /revision.h | |
parent | ddd02b70f0d80fc3cac6b2f2c42005560d572413 (diff) | |
download | git-ebdc94f3bec7ec54babb21b1d785af0cd75b21e6.tar.gz |
revision: --ancestry-path
"rev-list A..H" computes the set of commits that are ancestors of H, but
excludes the ones that are ancestors of A. This is useful to see what
happened to the history leading to H since A, in the sense that "what does
H have that did not exist in A" (e.g. when you have a choice to update to
H from A).
x---x---A---B---C <-- topic
/ \
x---x---x---o---o---o---o---M---D---E---F---G <-- dev
/ \
x---o---o---o---o---o---o---o---o---o---o---o---N---H <-- master
The result in the above example would be the commits marked with caps
letters (except for A itself, of course), and the ones marked with 'o'.
When you want to find out what commits in H are contaminated with the bug
introduced by A and need fixing, however, you might want to view only the
subset of "A..B" that are actually descendants of A, i.e. excluding the
ones marked with 'o'. Introduce a new option --ancestry-path to compute
this set with "rev-list --ancestry-path A..B".
Note that in practice, you would build a fix immediately on top of A and
"git branch --contains A" will give the names of branches that you would
need to merge the fix into (i.e. topic, dev and master), so this may not
be worth paying the extra cost of postprocessing.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'revision.h')
-rw-r--r-- | revision.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/revision.h b/revision.h index 568f1c98de..855464f144 100644 --- a/revision.h +++ b/revision.h @@ -66,6 +66,7 @@ struct rev_info { reverse_output_stage:1, cherry_pick:1, bisect:1, + ancestry_path:1, first_parent_only:1; /* Diff flags */ |