diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-10-05 12:35:54 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-10-05 12:35:54 -0700 |
commit | 8f4c996fc32087955e6def30e669ba6d27cec11e (patch) | |
tree | 9e8274b0cb105ddd53cf021235abfde90795d943 /t | |
parent | Merge branch 'jk/maint-fetch-submodule-check-fix' (diff) | |
parent | t6019: avoid refname collision on case-insensitive systems (diff) | |
download | tgif-8f4c996fc32087955e6def30e669ba6d27cec11e.tar.xz |
Merge branch 'bk/ancestry-path'
* bk/ancestry-path:
t6019: avoid refname collision on case-insensitive systems
revision: do not include sibling history in --ancestry-path output
revision: keep track of the end-user input from the command line
rev-list: Demonstrate breakage with --ancestry-path --all
Diffstat (limited to 't')
-rwxr-xr-x | t/t6019-rev-list-ancestry-path.sh | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/t/t6019-rev-list-ancestry-path.sh b/t/t6019-rev-list-ancestry-path.sh index 76410293b3..39b4cb0ecd 100755 --- a/t/t6019-rev-list-ancestry-path.sh +++ b/t/t6019-rev-list-ancestry-path.sh @@ -70,4 +70,42 @@ test_expect_success 'rev-list --ancestry-patch D..M -- M.t' ' test_cmp expect actual ' +# b---bc +# / \ / +# a X +# \ / \ +# c---cb +# +# All refnames prefixed with 'x' to avoid confusion with the tags +# generated by test_commit on case-insensitive systems. +test_expect_success 'setup criss-cross' ' + mkdir criss-cross && + (cd criss-cross && + git init && + test_commit A && + git checkout -b xb master && + test_commit B && + git checkout -b xc master && + test_commit C && + git checkout -b xbc xb -- && + git merge xc && + git checkout -b xcb xc -- && + git merge xb && + git checkout master) +' + +# no commits in bc descend from cb +test_expect_success 'criss-cross: rev-list --ancestry-path cb..bc' ' + (cd criss-cross && + git rev-list --ancestry-path xcb..xbc > actual && + test -z "$(cat actual)") +' + +# no commits in repository descend from cb +test_expect_success 'criss-cross: rev-list --ancestry-path --all ^cb' ' + (cd criss-cross && + git rev-list --ancestry-path --all ^xcb > actual && + test -z "$(cat actual)") +' + test_done |