Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--revision.c1
-rwxr-xr-xt/t6019-rev-list-ancestry-path.sh17
2 files changed, 18 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);
diff --git a/t/t6019-rev-list-ancestry-path.sh b/t/t6019-rev-list-ancestry-path.sh
index 0230724ca5..76410293b3 100755
--- a/t/t6019-rev-list-ancestry-path.sh
+++ b/t/t6019-rev-list-ancestry-path.sh
@@ -10,6 +10,9 @@ test_description='--ancestry-path'
#
# D..M == E F G H I J K L M
# --ancestry-path D..M == E F H I J L M
+#
+# D..M -- M.t == M
+# --ancestry-path D..M -- M.t == M
. ./test-lib.sh
@@ -53,4 +56,18 @@ test_expect_success 'rev-list --ancestry-path D..M' '
test_cmp expect actual
'
+test_expect_success 'rev-list D..M -- M.t' '
+ echo M >expect &&
+ git rev-list --format=%s D..M -- M.t |
+ sed -e "/^commit /d" >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'rev-list --ancestry-patch D..M -- M.t' '
+ echo M >expect &&
+ git rev-list --ancestry-path --format=%s D..M -- M.t |
+ sed -e "/^commit /d" >actual &&
+ test_cmp expect actual
+'
+
test_done