diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-10-15 20:46:38 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-10-15 20:46:38 -0700 |
commit | a151c28c729f459390027300f82465a669ba2df9 (patch) | |
tree | 2c85ee04644c9f27e382ab5db9a34de67e3bd6fb /t | |
parent | Merge branch 'jk/maint-fetch-submodule-check-fix' into maint (diff) | |
parent | t6019: avoid refname collision on case-insensitive systems (diff) | |
download | tgif-a151c28c729f459390027300f82465a669ba2df9.tar.xz |
Merge branch 'bk/ancestry-path' into maint
* 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 |