summaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
authorJohan Herland <johan@herland.net>2010-06-04 01:17:37 +0200
committerJunio C Hamano <gitster@pobox.com>2010-06-06 10:16:37 -0700
commitcb7529e13bce186f8b883c9fbb08602cd3a0795f (patch)
tree882bf412298bf54f2256e0b6b148735159746f65 /revision.c
parent97b03c353856602a3c30b01baae1efb8dfe4243e (diff)
downloadgit-cb7529e13bce186f8b883c9fbb08602cd3a0795f.tar.gz
revision: Turn off history simplification in --ancestry-path mode
When using --ancestry-path together with history simplification (typically triggered by path limiting), history simplification would get in the way of --ancestry-path by prematurely removing the parent links between commits on which the ancestry path calculations are made. This patch disables this history simplification when --ancestry-path is enabled. This is similar to what e.g. --full-history already does. The patch also includes a simple testcase verifying that --ancestry-path works together with path limiting. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/revision.c b/revision.c
index eb6f849cef..96d7fa7f14 100644
--- a/revision.c
+++ b/revision.c
@@ -1190,6 +1190,7 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
revs->first_parent_only = 1;
} else if (!strcmp(arg, "--ancestry-path")) {
revs->ancestry_path = 1;
+ revs->simplify_history = 0;
revs->limited = 1;
} else if (!strcmp(arg, "-g") || !strcmp(arg, "--walk-reflogs")) {
init_reflog_walk(&revs->reflog_info);