summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Johan Herland <johan@herland.net>2010-06-04 01:17:37 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-06-06 10:16:37 -0700
commitcb7529e13bce186f8b883c9fbb08602cd3a0795f (patch)
tree882bf412298bf54f2256e0b6b148735159746f65 /t
parentrevision: Fix typo in --ancestry-path error message (diff)
downloadtgif-cb7529e13bce186f8b883c9fbb08602cd3a0795f.tar.xz
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 't')
-rwxr-xr-xt/t6019-rev-list-ancestry-path.sh17
1 files changed, 17 insertions, 0 deletions
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