diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-09-21 20:13:08 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-09-21 20:13:13 -0700 |
commit | 3bcad5a23d7d114f831d7c11c7b29a8052b5a9f8 (patch) | |
tree | 5215762581d36fd3b02591c19ad250ececb78044 /t/t6019-rev-list-ancestry-path.sh | |
parent | Merge branch 'maint' (diff) | |
parent | t6019: avoid refname collision on case-insensitive systems (diff) | |
download | tgif-3bcad5a23d7d114f831d7c11c7b29a8052b5a9f8.tar.xz |
Merge branch 'bk/ancestry-path' into jc/branch-desc
* 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/t6019-rev-list-ancestry-path.sh')
-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 |