diff options
Diffstat (limited to 't')
146 files changed, 2187 insertions, 257 deletions
diff --git a/t/diff-lib.sh b/t/diff-lib.sh index 7dc6d7eb1e..28b941c493 100644 --- a/t/diff-lib.sh +++ b/t/diff-lib.sh @@ -21,8 +21,8 @@ compare_diff_raw_z () { # Also we do not check SHA1 hash generation in this test, which # is a job for t0000-basic.sh - tr '\000' '\012' <"$1" | sed -e "$sanitize_diff_raw_z" >.tmp-1 - tr '\000' '\012' <"$2" | sed -e "$sanitize_diff_raw_z" >.tmp-2 + perl -pe 'y/\000/\012/' <"$1" | sed -e "$sanitize_diff_raw_z" >.tmp-1 + perl -pe 'y/\000/\012/' <"$2" | sed -e "$sanitize_diff_raw_z" >.tmp-2 git diff .tmp-1 .tmp-2 && rm -f .tmp-1 .tmp-2 } diff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh index 9ee35e7901..9decd2e1e8 100644 --- a/t/lib-git-svn.sh +++ b/t/lib-git-svn.sh @@ -49,8 +49,28 @@ poke() { test-chmtime +1 "$1" } -SVN_HTTPD_MODULE_PATH=${SVN_HTTPD_MODULE_PATH-'/usr/lib/apache2/modules'} -SVN_HTTPD_PATH=${SVN_HTTPD_PATH-'/usr/sbin/apache2'} +for d in \ + "$SVN_HTTPD_PATH" \ + /usr/sbin/apache2 \ + /usr/sbin/httpd \ +; do + if test -f "$d" + then + SVN_HTTPD_PATH="$d" + break + fi +done +for d in \ + "$SVN_HTTPD_MODULE_PATH" \ + /usr/lib/apache2/modules \ + /usr/libexec/apache2 \ +; do + if test -d "$d" + then + SVN_HTTPD_MODULE_PATH="$d" + break + fi +done start_httpd () { if test -z "$SVN_HTTPD_PORT" @@ -66,6 +86,7 @@ ServerName "git-svn test" ServerRoot "$GIT_DIR" DocumentRoot "$GIT_DIR" PidFile "$GIT_DIR/httpd.pid" +LockFile logs/accept.lock Listen 127.0.0.1:$SVN_HTTPD_PORT LoadModule dav_module $SVN_HTTPD_MODULE_PATH/mod_dav.so LoadModule dav_svn_module $SVN_HTTPD_MODULE_PATH/mod_dav_svn.so diff --git a/t/t0001-init.sh b/t/t0001-init.sh index c015405f12..b0289e397a 100755 --- a/t/t0001-init.sh +++ b/t/t0001-init.sh @@ -113,4 +113,21 @@ test_expect_success 'GIT_DIR & GIT_WORK_TREE (2)' ' fi ' +test_expect_success 'reinit' ' + + ( + unset GIT_CONFIG GIT_WORK_TREE GIT_CONFIG + + mkdir again && + cd again && + git init >out1 2>err1 && + git init >out2 2>err2 + ) && + grep "Initialized empty" again/out1 && + grep "Reinitialized existing" again/out2 && + >again/empty && + test_cmp again/empty again/err1 && + test_cmp again/empty again/err2 +' + test_done diff --git a/t/t0003-attributes.sh b/t/t0003-attributes.sh index 47f08a46c2..3faf135e38 100755 --- a/t/t0003-attributes.sh +++ b/t/t0003-attributes.sh @@ -11,7 +11,7 @@ attr_check () { git check-attr test -- "$path" >actual && echo "$path: test: $2" >expect && - diff -u expect actual + test_cmp expect actual } diff --git a/t/t0020-crlf.sh b/t/t0020-crlf.sh index 90ea081db6..2bfeac986e 100755 --- a/t/t0020-crlf.sh +++ b/t/t0020-crlf.sh @@ -5,7 +5,7 @@ test_description='CRLF conversion' . ./test-lib.sh q_to_nul () { - tr Q '\000' + perl -pe 'y/Q/\000/' } q_to_cr () { diff --git a/t/t0022-crlf-rename.sh b/t/t0022-crlf-rename.sh index 430a1d1d38..7d1ce2d056 100755 --- a/t/t0022-crlf-rename.sh +++ b/t/t0022-crlf-rename.sh @@ -26,7 +26,7 @@ test_expect_success 'diff -M' ' git diff-tree -M -r --name-status HEAD^ HEAD | sed -e "s/R[0-9]*/RNUM/" >actual && echo "RNUM sample elpmas" >expect && - diff -u expect actual + test_cmp expect actual ' diff --git a/t/t0030-stripspace.sh b/t/t0030-stripspace.sh index 818c8621f2..3ecdd6626a 100755 --- a/t/t0030-stripspace.sh +++ b/t/t0030-stripspace.sh @@ -245,12 +245,12 @@ test_expect_success \ test_expect_success \ 'text plus spaces without newline at end should not show spaces' ' - ! (printf "$ttt$sss" | git stripspace | grep -q " ") && - ! (printf "$ttt$ttt$sss" | git stripspace | grep -q " ") && - ! (printf "$ttt$ttt$ttt$sss" | git stripspace | grep -q " ") && - ! (printf "$ttt$sss$sss" | git stripspace | grep -q " ") && - ! (printf "$ttt$ttt$sss$sss" | git stripspace | grep -q " ") && - ! (printf "$ttt$sss$sss$sss" | git stripspace | grep -q " ") + ! (printf "$ttt$sss" | git stripspace | grep " " >/dev/null) && + ! (printf "$ttt$ttt$sss" | git stripspace | grep " " >/dev/null) && + ! (printf "$ttt$ttt$ttt$sss" | git stripspace | grep " " >/dev/null) && + ! (printf "$ttt$sss$sss" | git stripspace | grep " " >/dev/null) && + ! (printf "$ttt$ttt$sss$sss" | git stripspace | grep " " >/dev/null) && + ! (printf "$ttt$sss$sss$sss" | git stripspace | grep " " >/dev/null) ' test_expect_success \ @@ -282,12 +282,12 @@ test_expect_success \ test_expect_success \ 'text plus spaces at end should not show spaces' ' - ! (echo "$ttt$sss" | git stripspace | grep -q " ") && - ! (echo "$ttt$ttt$sss" | git stripspace | grep -q " ") && - ! (echo "$ttt$ttt$ttt$sss" | git stripspace | grep -q " ") && - ! (echo "$ttt$sss$sss" | git stripspace | grep -q " ") && - ! (echo "$ttt$ttt$sss$sss" | git stripspace | grep -q " ") && - ! (echo "$ttt$sss$sss$sss" | git stripspace | grep -q " ") + ! (echo "$ttt$sss" | git stripspace | grep " " >/dev/null) && + ! (echo "$ttt$ttt$sss" | git stripspace | grep " " >/dev/null) && + ! (echo "$ttt$ttt$ttt$sss" | git stripspace | grep " " >/dev/null) && + ! (echo "$ttt$sss$sss" | git stripspace | grep " " >/dev/null) && + ! (echo "$ttt$ttt$sss$sss" | git stripspace | grep " " >/dev/null) && + ! (echo "$ttt$sss$sss$sss" | git stripspace | grep " " >/dev/null) ' test_expect_success \ @@ -341,11 +341,11 @@ test_expect_success \ test_expect_success \ 'spaces without newline at end should not show spaces' ' - ! (printf "" | git stripspace | grep -q " ") && - ! (printf "$sss" | git stripspace | grep -q " ") && - ! (printf "$sss$sss" | git stripspace | grep -q " ") && - ! (printf "$sss$sss$sss" | git stripspace | grep -q " ") && - ! (printf "$sss$sss$sss$sss" | git stripspace | grep -q " ") + ! (printf "" | git stripspace | grep " " >/dev/null) && + ! (printf "$sss" | git stripspace | grep " " >/dev/null) && + ! (printf "$sss$sss" | git stripspace | grep " " >/dev/null) && + ! (printf "$sss$sss$sss" | git stripspace | grep " " >/dev/null) && + ! (printf "$sss$sss$sss$sss" | git stripspace | grep " " >/dev/null) ' test_expect_success \ diff --git a/t/t0050-filesystem.sh b/t/t0050-filesystem.sh index cd088b37f0..3fbad77811 100755 --- a/t/t0050-filesystem.sh +++ b/t/t0050-filesystem.sh @@ -4,8 +4,8 @@ test_description='Various filesystem issues' . ./test-lib.sh -auml=`perl -CO -e 'print pack("U",0x00E4)'` -aumlcdiar=`perl -CO -e 'print pack("U",0x0061).pack("U",0x0308)'` +auml=`printf '\xc3\xa4'` +aumlcdiar=`printf '\x61\xcc\x88'` test_expect_success 'see if we expect ' ' diff --git a/t/t1000-read-tree-m-3way.sh b/t/t1000-read-tree-m-3way.sh index 6c065bfa21..17f519f547 100755 --- a/t/t1000-read-tree-m-3way.sh +++ b/t/t1000-read-tree-m-3way.sh @@ -214,7 +214,7 @@ test_expect_success '1 - must not have an entry not in A.' " rm -f .git/index XX && echo XX >XX && git update-index --add XX && - ! git read-tree -m $tree_O $tree_A $tree_B + test_must_fail git read-tree -m $tree_O $tree_A $tree_B " test_expect_success \ @@ -254,7 +254,7 @@ test_expect_success \ cp .orig-A/AN AN && echo extra >>AN && git update-index --add AN && - ! git read-tree -m $tree_O $tree_A $tree_B + test_must_fail git read-tree -m $tree_O $tree_A $tree_B " test_expect_success \ @@ -271,7 +271,7 @@ test_expect_success \ cp .orig-A/AA AA && git update-index --add AA && echo extra >>AA && - ! git read-tree -m $tree_O $tree_A $tree_B + test_must_fail git read-tree -m $tree_O $tree_A $tree_B " test_expect_success \ @@ -280,7 +280,7 @@ test_expect_success \ cp .orig-A/AA AA && echo extra >>AA && git update-index --add AA && - ! git read-tree -m $tree_O $tree_A $tree_B + test_must_fail git read-tree -m $tree_O $tree_A $tree_B " test_expect_success \ @@ -306,7 +306,7 @@ test_expect_success \ cp .orig-A/LL LL && echo extra >>LL && git update-index --add LL && - ! git read-tree -m $tree_O $tree_A $tree_B + test_must_fail git read-tree -m $tree_O $tree_A $tree_B " test_expect_success \ @@ -314,7 +314,7 @@ test_expect_success \ rm -f .git/index DD && echo DD >DD git update-index --add DD && - ! git read-tree -m $tree_O $tree_A $tree_B + test_must_fail git read-tree -m $tree_O $tree_A $tree_B " test_expect_success \ @@ -322,7 +322,7 @@ test_expect_success \ rm -f .git/index DM && cp .orig-B/DM DM && git update-index --add DM && - ! git read-tree -m $tree_O $tree_A $tree_B + test_must_fail git read-tree -m $tree_O $tree_A $tree_B " test_expect_success \ @@ -330,7 +330,7 @@ test_expect_success \ rm -f .git/index DN && cp .orig-B/DN DN && git update-index --add DN && - ! git read-tree -m $tree_O $tree_A $tree_B + test_must_fail git read-tree -m $tree_O $tree_A $tree_B " test_expect_success \ @@ -347,7 +347,7 @@ test_expect_success \ cp .orig-A/MD MD && git update-index --add MD && echo extra >>MD && - ! git read-tree -m $tree_O $tree_A $tree_B + test_must_fail git read-tree -m $tree_O $tree_A $tree_B " test_expect_success \ @@ -356,7 +356,7 @@ test_expect_success \ cp .orig-A/MD MD && echo extra >>MD && git update-index --add MD && - ! git read-tree -m $tree_O $tree_A $tree_B + test_must_fail git read-tree -m $tree_O $tree_A $tree_B " test_expect_success \ @@ -373,7 +373,7 @@ test_expect_success \ cp .orig-A/ND ND && git update-index --add ND && echo extra >>ND && - ! git read-tree -m $tree_O $tree_A $tree_B + test_must_fail git read-tree -m $tree_O $tree_A $tree_B " test_expect_success \ @@ -382,7 +382,7 @@ test_expect_success \ cp .orig-A/ND ND && echo extra >>ND && git update-index --add ND && - ! git read-tree -m $tree_O $tree_A $tree_B + test_must_fail git read-tree -m $tree_O $tree_A $tree_B " test_expect_success \ @@ -399,7 +399,7 @@ test_expect_success \ cp .orig-A/MM MM && git update-index --add MM && echo extra >>MM && - ! git read-tree -m $tree_O $tree_A $tree_B + test_must_fail git read-tree -m $tree_O $tree_A $tree_B " test_expect_success \ @@ -408,7 +408,7 @@ test_expect_success \ cp .orig-A/MM MM && echo extra >>MM && git update-index --add MM && - ! git read-tree -m $tree_O $tree_A $tree_B + test_must_fail git read-tree -m $tree_O $tree_A $tree_B " test_expect_success \ @@ -434,7 +434,7 @@ test_expect_success \ cp .orig-A/SS SS && echo extra >>SS && git update-index --add SS && - ! git read-tree -m $tree_O $tree_A $tree_B + test_must_fail git read-tree -m $tree_O $tree_A $tree_B " test_expect_success \ @@ -477,7 +477,7 @@ test_expect_success \ cp .orig-A/NM NM && git update-index --add NM && echo extra >>NM && - ! git read-tree -m $tree_O $tree_A $tree_B + test_must_fail git read-tree -m $tree_O $tree_A $tree_B " test_expect_success \ @@ -486,7 +486,7 @@ test_expect_success \ cp .orig-A/NM NM && echo extra >>NM && git update-index --add NM && - ! git read-tree -m $tree_O $tree_A $tree_B + test_must_fail git read-tree -m $tree_O $tree_A $tree_B " test_expect_success \ @@ -512,7 +512,7 @@ test_expect_success \ cp .orig-A/NN NN && echo extra >>NN && git update-index --add NN && - ! git read-tree -m $tree_O $tree_A $tree_B + test_must_fail git read-tree -m $tree_O $tree_A $tree_B " # #16 diff --git a/t/t1004-read-tree-m-u-wf.sh b/t/t1004-read-tree-m-u-wf.sh index d609a551ae..570d3729bd 100755 --- a/t/t1004-read-tree-m-u-wf.sh +++ b/t/t1004-read-tree-m-u-wf.sh @@ -116,4 +116,126 @@ test_expect_success 'three-way not complaining on an untracked file' ' git read-tree -m -u --exclude-per-directory=.gitignore branch-point master side ' +test_expect_success '3-way not overwriting local changes (setup)' ' + + git reset --hard && + git checkout -b side-a branch-point && + echo >>file1 "new line to be kept in the merge result" && + git commit -a -m "side-a changes file1" && + git checkout -b side-b branch-point && + echo >>file2 "new line to be kept in the merge result" && + git commit -a -m "side-b changes file2" && + git checkout side-a + +' + +test_expect_success '3-way not overwriting local changes (our side)' ' + + # At this point, file1 from side-a should be kept as side-b + # did not touch it. + + git reset --hard && + + echo >>file1 "local changes" && + git read-tree -m -u branch-point side-a side-b && + grep "new line to be kept" file1 && + grep "local changes" file1 + +' + +test_expect_success '3-way not overwriting local changes (their side)' ' + + # At this point, file2 from side-b should be taken as side-a + # did not touch it. + + git reset --hard && + + echo >>file2 "local changes" && + test_must_fail git read-tree -m -u branch-point side-a side-b && + ! grep "new line to be kept" file2 && + grep "local changes" file2 + +' + +test_expect_success 'funny symlink in work tree' ' + + git reset --hard && + git checkout -b sym-b side-b && + mkdir -p a && + >a/b && + git add a/b && + git commit -m "side adds a/b" && + + rm -fr a && + git checkout -b sym-a side-a && + mkdir -p a && + ln -s ../b a/b && + git add a/b && + git commit -m "we add a/b" && + + git read-tree -m -u sym-a sym-a sym-b + +' + +test_expect_success 'funny symlink in work tree, un-unlink-able' ' + + rm -fr a b && + git reset --hard && + + git checkout sym-a && + chmod a-w a && + test_must_fail git read-tree -m -u sym-a sym-a sym-b + +' + +# clean-up from the above test +chmod a+w a +rm -fr a b + +test_expect_success 'D/F setup' ' + + git reset --hard && + + git checkout side-a && + rm -f subdir/file2 && + mkdir subdir/file2 && + echo qfwfq >subdir/file2/another && + git add subdir/file2/another && + test_tick && + git commit -m "side-a changes file2 to directory" + +' + +test_expect_success 'D/F' ' + + git checkout side-b && + git read-tree -m -u branch-point side-b side-a && + git ls-files -u >actual && + ( + a=$(git rev-parse branch-point:subdir/file2) + b=$(git rev-parse side-a:subdir/file2/another) + echo "100644 $a 1 subdir/file2" + echo "100644 $a 2 subdir/file2" + echo "100644 $b 3 subdir/file2/another" + ) >expect && + test_cmp actual expect + +' + +test_expect_success 'D/F resolve' ' + + git reset --hard && + git checkout side-b && + git merge-resolve branch-point -- side-b side-a + +' + +test_expect_success 'D/F recursive' ' + + git reset --hard && + git checkout side-b && + git merge-recursive branch-point -- side-b side-a + +' + test_done diff --git a/t/t1005-read-tree-reset.sh b/t/t1005-read-tree-reset.sh index 8c4556408e..b0d31f5a9b 100755 --- a/t/t1005-read-tree-reset.sh +++ b/t/t1005-read-tree-reset.sh @@ -24,7 +24,7 @@ test_expect_success 'setup' ' test_expect_success 'reset should work' ' git read-tree -u --reset HEAD^ && git ls-files >actual && - diff -u expect actual + test_cmp expect actual ' test_done diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh index 4928a57114..b36a9012ec 100755 --- a/t/t1300-repo-config.sh +++ b/t/t1300-repo-config.sh @@ -657,12 +657,12 @@ Qsection.sub=section.val4 Qsection.sub=section.val5Q EOF -git config --null --list | tr '\000' 'Q' > result +git config --null --list | perl -pe 'y/\000/Q/' > result echo >>result test_expect_success '--null --list' 'cmp result expect' -git config --null --get-regexp 'val[0-9]' | tr '\000' 'Q' > result +git config --null --get-regexp 'val[0-9]' | perl -pe 'y/\000/Q/' > result echo >>result test_expect_success '--null --get-regexp' 'cmp result expect' diff --git a/t/t2200-add-update.sh b/t/t2200-add-update.sh index 24f892f793..b664341926 100755 --- a/t/t2200-add-update.sh +++ b/t/t2200-add-update.sh @@ -62,7 +62,7 @@ test_expect_success 'cache tree has not been corrupted' ' sed -e "s/ 0 / /" >expect && git ls-tree -r $(git write-tree) | sed -e "s/ blob / /" >current && - diff -u expect current + test_cmp expect current ' diff --git a/t/t2201-add-update-typechange.sh b/t/t2201-add-update-typechange.sh new file mode 100755 index 0000000000..e15e3eb81b --- /dev/null +++ b/t/t2201-add-update-typechange.sh @@ -0,0 +1,140 @@ +#!/bin/sh + +test_description='more git add -u' + +. ./test-lib.sh + +_z40=0000000000000000000000000000000000000000 + +test_expect_success setup ' + >xyzzy && + _empty=$(git hash-object --stdin <xyzzy) && + >yomin && + >caskly && + ln -s frotz nitfol && + mkdir rezrov && + >rezrov/bozbar && + git add caskly xyzzy yomin nitfol rezrov/bozbar && + + test_tick && + git commit -m initial + +' + +test_expect_success modify ' + rm -f xyzzy yomin nitfol caskly && + # caskly disappears (not a submodule) + mkdir caskly && + # nitfol changes from symlink to regular + >nitfol && + # rezrov/bozbar disappears + rm -fr rezrov && + ln -s xyzzy rezrov && + # xyzzy disappears (not a submodule) + mkdir xyzzy && + echo gnusto >xyzzy/bozbar && + # yomin gets replaced with a submodule + mkdir yomin && + >yomin/yomin && + ( + cd yomin && + git init && + git add yomin && + git commit -m "sub initial" + ) && + yomin=$(GIT_DIR=yomin/.git git rev-parse HEAD) && + # yonk is added and then turned into a submodule + # this should appear as T in diff-files and as A in diff-index + >yonk && + git add yonk && + rm -f yonk && + mkdir yonk && + >yonk/yonk && + ( + cd yonk && + git init && + git add yonk && + git commit -m "sub initial" + ) && + yonk=$(GIT_DIR=yonk/.git git rev-parse HEAD) && + # zifmia is added and then removed + # this should appear in diff-files but not in diff-index. + >zifmia && + git add zifmia && + rm -f zifmia && + mkdir zifmia && + { + git ls-tree -r HEAD | + sed -e "s/^/:/" -e " + / caskly/{ + s/ caskly/ $_z40 D&/ + s/blob/000000/ + } + / nitfol/{ + s/ nitfol/ $_z40 T&/ + s/blob/100644/ + } + / rezrov.bozbar/{ + s/ rezrov.bozbar/ $_z40 D&/ + s/blob/000000/ + } + / xyzzy/{ + s/ xyzzy/ $_z40 D&/ + s/blob/000000/ + } + / yomin/{ + s/ yomin/ $_z40 T&/ + s/blob/160000/ + } + " + } >expect && + { + cat expect + echo ":100644 160000 $_empty $_z40 T yonk" + echo ":100644 000000 $_empty $_z40 D zifmia" + } >expect-files && + { + cat expect + echo ":000000 160000 $_z40 $_z40 A yonk" + } >expect-index && + { + echo "100644 $_empty 0 nitfol" + echo "160000 $yomin 0 yomin" + echo "160000 $yonk 0 yonk" + } >expect-final +' + +test_expect_success diff-files ' + git diff-files --raw >actual && + diff -u expect-files actual +' + +test_expect_success diff-index ' + git diff-index --raw HEAD -- >actual && + diff -u expect-index actual +' + +test_expect_success 'add -u' ' + rm -f ".git/saved-index" && + cp -p ".git/index" ".git/saved-index" && + git add -u && + git ls-files -s >actual && + diff -u expect-final actual +' + +test_expect_success 'commit -a' ' + if test -f ".git/saved-index" + then + rm -f ".git/index" && + mv ".git/saved-index" ".git/index" + fi && + git commit -m "second" -a && + git ls-files -s >actual && + diff -u expect-final actual && + rm -f .git/index && + git read-tree HEAD && + git ls-files -s >actual && + diff -u expect-final actual +' + +test_done diff --git a/t/t3001-ls-files-others-exclude.sh b/t/t3001-ls-files-others-exclude.sh index b4297bacf2..55f057cebe 100755 --- a/t/t3001-ls-files-others-exclude.sh +++ b/t/t3001-ls-files-others-exclude.sh @@ -97,7 +97,7 @@ cat > expect << EOF EOF test_expect_success 'git-status honours core.excludesfile' \ - 'diff -u expect output' + 'test_cmp expect output' test_expect_success 'trailing slash in exclude allows directory match(1)' ' diff --git a/t/t3050-subprojects-fetch.sh b/t/t3050-subprojects-fetch.sh index 34f26a8d9e..2b21b1070d 100755 --- a/t/t3050-subprojects-fetch.sh +++ b/t/t3050-subprojects-fetch.sh @@ -26,7 +26,7 @@ test_expect_success clone ' cd cloned && (git rev-parse HEAD; git ls-files -s) >../actual ) && - diff -u expected actual + test_cmp expected actual ' test_expect_success advance ' @@ -46,7 +46,7 @@ test_expect_success fetch ' git pull && (git rev-parse HEAD; git ls-files -s) >../actual ) && - diff -u expected actual + test_cmp expected actual ' test_done diff --git a/t/t3060-ls-files-with-tree.sh b/t/t3060-ls-files-with-tree.sh index 68eb266d73..3ce501bb97 100755 --- a/t/t3060-ls-files-with-tree.sh +++ b/t/t3060-ls-files-with-tree.sh @@ -66,6 +66,6 @@ test_expect_success 'git -ls-files --with-tree should succeed from subdir' ' cd .. test_expect_success \ 'git -ls-files --with-tree should add entries from named tree.' \ - 'diff -u expected output' + 'test_cmp expected output' test_done diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index 38a90adad6..cb5f7a4441 100755 --- a/t/t3200-branch.sh +++ b/t/t3200-branch.sh @@ -153,16 +153,6 @@ test_expect_success 'test tracking setup via config' \ test $(git config branch.my3.remote) = local && test $(git config branch.my3.merge) = refs/heads/master' -test_expect_success 'avoid ambiguous track' ' - git config branch.autosetupmerge true && - git config remote.ambi1.url = lalala && - git config remote.ambi1.fetch = refs/heads/lalala:refs/heads/master && - git config remote.ambi2.url = lilili && - git config remote.ambi2.fetch = refs/heads/lilili:refs/heads/master && - git branch all1 master && - test -z "$(git config branch.all1.merge)" -' - test_expect_success 'test overriding tracking setup via --no-track' \ 'git config branch.autosetupmerge true && git config remote.local.url . && @@ -224,4 +214,14 @@ test_expect_success \ test -f .git/logs/refs/heads/g/h/i && diff expect .git/logs/refs/heads/g/h/i' +test_expect_success 'avoid ambiguous track' ' + git config branch.autosetupmerge true && + git config remote.ambi1.url lalala && + git config remote.ambi1.fetch refs/heads/lalala:refs/heads/master && + git config remote.ambi2.url lilili && + git config remote.ambi2.fetch refs/heads/lilili:refs/heads/master && + git branch all1 master && + test -z "$(git config branch.all1.merge)" +' + test_done diff --git a/t/t3201-branch-contains.sh b/t/t3201-branch-contains.sh index 9ef593f0e1..b4cf628d22 100755 --- a/t/t3201-branch-contains.sh +++ b/t/t3201-branch-contains.sh @@ -31,7 +31,7 @@ test_expect_success 'branch --contains=master' ' { echo " master" && echo "* side" } >expect && - diff -u expect actual + test_cmp expect actual ' @@ -41,7 +41,7 @@ test_expect_success 'branch --contains master' ' { echo " master" && echo "* side" } >expect && - diff -u expect actual + test_cmp expect actual ' @@ -51,7 +51,7 @@ test_expect_success 'branch --contains=side' ' { echo "* side" } >expect && - diff -u expect actual + test_cmp expect actual ' diff --git a/t/t3300-funny-names.sh b/t/t3300-funny-names.sh index 98c133db50..24a00a9df1 100755 --- a/t/t3300-funny-names.sh +++ b/t/t3300-funny-names.sh @@ -54,7 +54,7 @@ echo 'just space no-funny tabs ," (dq) and spaces' >expected test_expect_success 'git ls-files -z with-funny' \ - 'git ls-files -z | tr \\000 \\012 >current && + 'git ls-files -z | perl -pe y/\\000/\\012/ >current && git diff expected current' t1=`git write-tree` @@ -83,11 +83,11 @@ test_expect_success 'git diff-tree with-funny' \ echo 'A tabs ," (dq) and spaces' >expected test_expect_success 'git diff-index -z with-funny' \ - 'git diff-index -z --name-status $t0 | tr \\000 \\012 >current && + 'git diff-index -z --name-status $t0 | perl -pe y/\\000/\\012/ >current && git diff expected current' test_expect_success 'git diff-tree -z with-funny' \ - 'git diff-tree -z --name-status $t0 $t1 | tr \\000 \\012 >current && + 'git diff-tree -z --name-status $t0 $t1 | perl -pe y/\\000/\\012/ >current && git diff expected current' cat > expected <<\EOF diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh index 049aa37538..9cf873f7eb 100755 --- a/t/t3404-rebase-interactive.sh +++ b/t/t3404-rebase-interactive.sh @@ -122,8 +122,8 @@ test_expect_success 'reflog for the branch shows state before rebase' ' test_expect_success 'exchange two commits' ' FAKE_LINES="2 1" git rebase -i HEAD~2 && - test H = $(git cat-file commit HEAD^ | tail -n 1) && - test G = $(git cat-file commit HEAD | tail -n 1) + test H = $(git cat-file commit HEAD^ | sed -ne \$p) && + test G = $(git cat-file commit HEAD | sed -ne \$p) ' cat > expect << EOF @@ -146,11 +146,10 @@ EOF test_expect_success 'stop on conflicting pick' ' git tag new-branch1 && ! git rebase -i master && - diff -u expect .git/.dotest-merge/patch && - diff -u expect2 file1 && + test_cmp expect .git/.dotest-merge/patch && + test_cmp expect2 file1 && test 4 = $(grep -v "^#" < .git/.dotest-merge/done | wc -l) && - test 0 = $(grep -ve "^#" -e "^$" < .git/.dotest-merge/git-rebase-todo | - wc -l) + test 0 = $(grep -c "^[^#]" < .git/.dotest-merge/git-rebase-todo) ' test_expect_success 'abort' ' diff --git a/t/t3405-rebase-malformed.sh b/t/t3405-rebase-malformed.sh index e4e2e649ed..e5ad67c643 100755 --- a/t/t3405-rebase-malformed.sh +++ b/t/t3405-rebase-malformed.sh @@ -41,8 +41,8 @@ test_expect_success rebase ' git rebase master side && git cat-file commit HEAD | sed -e "1,/^\$/d" >F1 && - diff -u F0 F1 && - diff -u F F0 + test_cmp F0 F1 && + test_cmp F F0 ' test_done diff --git a/t/t3406-rebase-message.sh b/t/t3406-rebase-message.sh index 332b2b2feb..5391080943 100755 --- a/t/t3406-rebase-message.sh +++ b/t/t3406-rebase-message.sh @@ -37,7 +37,7 @@ test_expect_success 'rebase -m' ' git rebase -m master >report && sed -n -e "/^Already applied: /p" \ -e "/^Committed: /p" report >actual && - diff -u expect actual + test_cmp expect actual ' diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh index c8dc1ac241..f15be93e77 100755 --- a/t/t3701-add-interactive.sh +++ b/t/t3701-add-interactive.sh @@ -24,7 +24,7 @@ EOF test_expect_success 'diff works (initial)' ' (echo d; echo 1) | git add -i >output && sed -ne "/new file/,/content/p" <output >diff && - diff -u expected diff + test_cmp expected diff ' test_expect_success 'revert works (initial)' ' git add file && @@ -57,7 +57,7 @@ EOF test_expect_success 'diff works (commit)' ' (echo d; echo 1) | git add -i >output && sed -ne "/^index/,/content/p" <output >diff && - diff -u expected diff + test_cmp expected diff ' test_expect_success 'revert works (commit)' ' git add file && @@ -66,4 +66,23 @@ test_expect_success 'revert works (commit)' ' grep "unchanged *+3/-0 file" output ' +test_expect_success 'patch does not affect mode' ' + git reset --hard && + echo content >>file && + chmod +x file && + printf "n\\ny\\n" | git add -p && + git show :file | grep content && + git diff file | grep "new mode" +' + +test_expect_success 'stage mode but not hunk' ' + git reset --hard && + echo content >>file && + chmod +x file && + printf "y\\nn\\n" | git add -p && + git diff --cached file | grep "new mode" && + git diff file | grep "+content" +' + + test_done diff --git a/t/t3800-mktag.sh b/t/t3800-mktag.sh index f2803206f1..df1fd6f86f 100755 --- a/t/t3800-mktag.sh +++ b/t/t3800-mktag.sh @@ -14,8 +14,8 @@ test_description='git-mktag: tag object verify test' check_verify_failure () { expect="$2" test_expect_success "$1" ' - ( ! git-mktag <tag.sig 2>message ) && - grep -q "$expect" message + ( test_must_fail git-mktag <tag.sig 2>message ) && + grep "$expect" message ' } @@ -44,6 +44,8 @@ cat >tag.sig <<EOF xxxxxx 139e9b33986b1c2670fff52c5067603117b3e895 type tag tag mytag +tagger . <> 0 +0000 + EOF check_verify_failure '"object" line label check' '^error: char0: .*"object "$' @@ -55,6 +57,8 @@ cat >tag.sig <<EOF object zz9e9b33986b1c2670fff52c5067603117b3e895 type tag tag mytag +tagger . <> 0 +0000 + EOF check_verify_failure '"object" line SHA1 check' '^error: char7: .*SHA1 hash$' @@ -66,6 +70,8 @@ cat >tag.sig <<EOF object 779e9b33986b1c2670fff52c5067603117b3e895 xxxx tag tag mytag +tagger . <> 0 +0000 + EOF check_verify_failure '"type" line label check' '^error: char47: .*"\\ntype "$' @@ -85,6 +91,8 @@ cat >tag.sig <<EOF object 779e9b33986b1c2670fff52c5067603117b3e895 type tag xxx mytag +tagger . <> 0 +0000 + EOF check_verify_failure '"tag" line label check #1' \ @@ -121,6 +129,8 @@ cat >tag.sig <<EOF object 779e9b33986b1c2670fff52c5067603117b3e895 type tagggg tag mytag +tagger . <> 0 +0000 + EOF check_verify_failure 'verify object (SHA1/type) check' \ @@ -133,6 +143,8 @@ cat >tag.sig <<EOF object $head type commit tag my tag +tagger . <> 0 +0000 + EOF check_verify_failure 'verify tag-name check' \ @@ -145,10 +157,12 @@ cat >tag.sig <<EOF object $head type commit tag mytag + +This is filler EOF check_verify_failure '"tagger" line label check #1' \ - '^error: char70: could not find "tagger"$' + '^error: char70: could not find "tagger "$' ############################################################ # 12. tagger line label check #2 @@ -158,19 +172,180 @@ object $head type commit tag mytag tagger + +This is filler EOF check_verify_failure '"tagger" line label check #2' \ - '^error: char70: could not find "tagger"$' + '^error: char70: could not find "tagger "$' ############################################################ -# 13. create valid tag +# 13. disallow missing tag author name cat >tag.sig <<EOF object $head type commit tag mytag -tagger another@example.com +tagger <> 0 +0000 + +This is filler +EOF + +check_verify_failure 'disallow missing tag author name' \ + '^error: char77: missing tagger name$' + +############################################################ +# 14. disallow missing tag author name + +cat >tag.sig <<EOF +object $head +type commit +tag mytag +tagger T A Gger < + > 0 +0000 + +EOF + +check_verify_failure 'disallow malformed tagger' \ + '^error: char77: malformed tagger field$' + +############################################################ +# 15. allow empty tag email + +cat >tag.sig <<EOF +object $head +type commit +tag mytag +tagger T A Gger <> 0 +0000 + +EOF + +test_expect_success \ + 'allow empty tag email' \ + 'git-mktag <tag.sig >.git/refs/tags/mytag 2>message' + +############################################################ +# 16. disallow spaces in tag email + +cat >tag.sig <<EOF +object $head +type commit +tag mytag +tagger T A Gger <tag ger@example.com> 0 +0000 + +EOF + +check_verify_failure 'disallow spaces in tag email' \ + '^error: char77: malformed tagger field$' + +############################################################ +# 17. disallow missing tag timestamp + +cat >tag.sig <<EOF +object $head +type commit +tag mytag +tagger T A Gger <tagger@example.com> + +EOF + +check_verify_failure 'disallow missing tag timestamp' \ + '^error: char107: missing tag timestamp$' + +############################################################ +# 18. detect invalid tag timestamp1 + +cat >tag.sig <<EOF +object $head +type commit +tag mytag +tagger T A Gger <tagger@example.com> Tue Mar 25 15:47:44 2008 + +EOF + +check_verify_failure 'detect invalid tag timestamp1' \ + '^error: char107: missing tag timestamp$' + +############################################################ +# 19. detect invalid tag timestamp2 + +cat >tag.sig <<EOF +object $head +type commit +tag mytag +tagger T A Gger <tagger@example.com> 2008-03-31T12:20:15-0500 + +EOF + +check_verify_failure 'detect invalid tag timestamp2' \ + '^error: char111: malformed tag timestamp$' + +############################################################ +# 20. detect invalid tag timezone1 + +cat >tag.sig <<EOF +object $head +type commit +tag mytag +tagger T A Gger <tagger@example.com> 1206478233 GMT + +EOF + +check_verify_failure 'detect invalid tag timezone1' \ + '^error: char118: malformed tag timezone$' + +############################################################ +# 21. detect invalid tag timezone2 + +cat >tag.sig <<EOF +object $head +type commit +tag mytag +tagger T A Gger <tagger@example.com> 1206478233 + 30 + +EOF + +check_verify_failure 'detect invalid tag timezone2' \ + '^error: char118: malformed tag timezone$' + +############################################################ +# 22. detect invalid tag timezone3 + +cat >tag.sig <<EOF +object $head +type commit +tag mytag +tagger T A Gger <tagger@example.com> 1206478233 -1430 + +EOF + +check_verify_failure 'detect invalid tag timezone3' \ + '^error: char118: malformed tag timezone$' + +############################################################ +# 23. detect invalid header entry + +cat >tag.sig <<EOF +object $head +type commit +tag mytag +tagger T A Gger <tagger@example.com> 1206478233 -0500 +this line should not be here + +EOF + +check_verify_failure 'detect invalid header entry' \ + '^error: char124: trailing garbage in tag header$' + +############################################################ +# 24. create valid tag + +cat >tag.sig <<EOF +object $head +type commit +tag mytag +tagger T A Gger <tagger@example.com> 1206478233 -0500 + EOF test_expect_success \ @@ -178,7 +353,7 @@ test_expect_success \ 'git-mktag <tag.sig >.git/refs/tags/mytag 2>message' ############################################################ -# 14. check mytag +# 25. check mytag test_expect_success \ 'check mytag' \ diff --git a/t/t3902-quoted.sh b/t/t3902-quoted.sh index 73da45f18c..fe4fb5116a 100755 --- a/t/t3902-quoted.sh +++ b/t/t3902-quoted.sh @@ -78,28 +78,28 @@ EOF test_expect_success 'check fully quoted output from ls-files' ' - git ls-files >current && diff -u expect.quoted current + git ls-files >current && test_cmp expect.quoted current ' test_expect_success 'check fully quoted output from diff-files' ' git diff --name-only >current && - diff -u expect.quoted current + test_cmp expect.quoted current ' test_expect_success 'check fully quoted output from diff-index' ' git diff --name-only HEAD >current && - diff -u expect.quoted current + test_cmp expect.quoted current ' test_expect_success 'check fully quoted output from diff-tree' ' git diff --name-only HEAD^ HEAD >current && - diff -u expect.quoted current + test_cmp expect.quoted current ' @@ -111,28 +111,28 @@ test_expect_success 'setting core.quotepath' ' test_expect_success 'check fully quoted output from ls-files' ' - git ls-files >current && diff -u expect.raw current + git ls-files >current && test_cmp expect.raw current ' test_expect_success 'check fully quoted output from diff-files' ' git diff --name-only >current && - diff -u expect.raw current + test_cmp expect.raw current ' test_expect_success 'check fully quoted output from diff-index' ' git diff --name-only HEAD >current && - diff -u expect.raw current + test_cmp expect.raw current ' test_expect_success 'check fully quoted output from diff-tree' ' git diff --name-only HEAD^ HEAD >current && - diff -u expect.raw current + test_cmp expect.raw current ' diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh index aa282e1bc1..2d3ee3b78c 100755 --- a/t/t3903-stash.sh +++ b/t/t3903-stash.sh @@ -34,7 +34,7 @@ EOF test_expect_success 'parents of stash' ' test $(git rev-parse stash^) = $(git rev-parse HEAD) && git diff stash^2..stash > output && - diff -u output expect + test_cmp output expect ' test_expect_success 'apply needs clean working directory' ' diff --git a/t/t4020-diff-external.sh b/t/t4020-diff-external.sh index 888293361d..637b4e19d5 100755 --- a/t/t4020-diff-external.sh +++ b/t/t4020-diff-external.sh @@ -99,11 +99,12 @@ test_expect_success 'no diff with -diff' ' git diff | grep Binary ' -echo NULZbetweenZwords | tr Z '\000' > file +echo NULZbetweenZwords | perl -pe 'y/Z/\000/' > file test_expect_success 'force diff with "diff"' ' echo >.gitattributes "file diff" && - git diff | grep -a second + git diff >actual && + test_cmp ../t4020/diff.NUL actual ' test_done diff --git a/t/t4020/diff.NUL b/t/t4020/diff.NUL Binary files differnew file mode 100644 index 0000000000..db2f89090c --- /dev/null +++ b/t/t4020/diff.NUL diff --git a/t/t4021-format-patch-signer-mime.sh b/t/t4021-format-patch-signer-mime.sh index 67a70fadab..ba43f18549 100755 --- a/t/t4021-format-patch-signer-mime.sh +++ b/t/t4021-format-patch-signer-mime.sh @@ -32,11 +32,19 @@ test_expect_success 'format with signoff without funny signer name' ' test_expect_success 'format with non ASCII signer name' ' - GIT_COMMITTER_NAME="$B$O$^$N(B $B$U$K$*$&(B" \ + GIT_COMMITTER_NAME="はまの ふにおう" \ git format-patch -s --stdout -1 >output && grep Content-Type output ' +test_expect_success 'attach and signoff do not duplicate mime headers' ' + + GIT_COMMITTER_NAME="はまの ふにおう" \ + git format-patch -s --stdout -1 --attach >output && + test `grep -ci ^MIME-Version: output` = 1 + +' + test_done diff --git a/t/t4022-diff-rewrite.sh b/t/t4022-diff-rewrite.sh index 6de4acbd44..bf996fc414 100755 --- a/t/t4022-diff-rewrite.sh +++ b/t/t4022-diff-rewrite.sh @@ -8,7 +8,10 @@ test_expect_success setup ' cat ../../COPYING >test && git add test && - tr 'a-zA-Z' 'n-za-mN-ZA-M' <../../COPYING >test + tr \ + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" \ + "nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM" \ + <../../COPYING >test ' diff --git a/t/t4023-diff-rename-typechange.sh b/t/t4023-diff-rename-typechange.sh index 255604effd..4dbfc6e8b7 100755 --- a/t/t4023-diff-rename-typechange.sh +++ b/t/t4023-diff-rename-typechange.sh @@ -57,7 +57,7 @@ test_expect_success 'cross renames to be detected for regular files' ' echo "R100 foo bar" echo "R100 bar foo" } | sort >expect && - diff -u expect actual + test_cmp expect actual ' @@ -68,7 +68,7 @@ test_expect_success 'cross renames to be detected for typechange' ' echo "R100 foo bar" echo "R100 bar foo" } | sort >expect && - diff -u expect actual + test_cmp expect actual ' @@ -79,7 +79,7 @@ test_expect_success 'moves and renames' ' echo "R100 foo bar" echo "T100 foo" } | sort >expect && - diff -u expect actual + test_cmp expect actual ' diff --git a/t/t4024-diff-optimize-common.sh b/t/t4024-diff-optimize-common.sh index 3c66102f7a..c4d733f5db 100755 --- a/t/t4024-diff-optimize-common.sh +++ b/t/t4024-diff-optimize-common.sh @@ -150,7 +150,7 @@ test_expect_success 'diff -U0' ' do git diff -U0 file-?$n done | zc >actual && - diff -u expect actual + test_cmp expect actual ' diff --git a/t/t4025-hunk-header.sh b/t/t4025-hunk-header.sh index 9ba06b74ce..7a3dbc1ea2 100755 --- a/t/t4025-hunk-header.sh +++ b/t/t4025-hunk-header.sh @@ -37,7 +37,7 @@ test_expect_success 'hunk header truncation with an overly long line' ' echo " A $N$N$N$N$N$N$N$N$N2" echo " L $N$N$N$N$N$N$N$N$N1" ) >expected && - diff -u actual expected + test_cmp actual expected ' diff --git a/t/t4027-diff-submodule.sh b/t/t4027-diff-submodule.sh index 3d2d0816a3..1fd3fb74d7 100755 --- a/t/t4027-diff-submodule.sh +++ b/t/t4027-diff-submodule.sh @@ -37,17 +37,17 @@ test_expect_success setup ' test_expect_success 'git diff --raw HEAD' ' git diff --raw --abbrev=40 HEAD >actual && - diff -u expect actual + test_cmp expect actual ' test_expect_success 'git diff-index --raw HEAD' ' git diff-index --raw HEAD >actual.index && - diff -u expect actual.index + test_cmp expect actual.index ' test_expect_success 'git diff-files --raw' ' git diff-files --raw >actual.files && - diff -u expect actual.files + test_cmp expect actual.files ' test_done diff --git a/t/t4028-format-patch-mime-headers.sh b/t/t4028-format-patch-mime-headers.sh new file mode 100755 index 0000000000..204ba673cb --- /dev/null +++ b/t/t4028-format-patch-mime-headers.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +test_description='format-patch mime headers and extra headers do not conflict' +. ./test-lib.sh + +test_expect_success 'create commit with utf-8 body' ' + echo content >file && + git add file && + git commit -m one && + echo more >>file && + git commit -a -m "two + + utf-8 body: ñ" +' + +test_expect_success 'patch has mime headers' ' + rm -f 0001-two.patch && + git format-patch HEAD^ && + grep -i "content-type: text/plain; charset=utf-8" 0001-two.patch +' + +test_expect_success 'patch has mime and extra headers' ' + rm -f 0001-two.patch && + git config format.headers "x-foo: bar" && + git format-patch HEAD^ && + grep -i "x-foo: bar" 0001-two.patch && + grep -i "content-type: text/plain; charset=utf-8" 0001-two.patch +' + +test_done diff --git a/t/t4103-apply-binary.sh b/t/t4103-apply-binary.sh index 7c25634fc2..1b58233da6 100755 --- a/t/t4103-apply-binary.sh +++ b/t/t4103-apply-binary.sh @@ -24,10 +24,10 @@ git update-index --add --remove file1 file2 file4 git-commit -m 'Initial Version' 2>/dev/null git-checkout -b binary -tr 'x' '\000' <file1 >file3 +perl -pe 'y/x/\000/' <file1 >file3 cat file3 >file4 git add file2 -tr '\000' 'v' <file3 >file1 +perl -pe 'y/\000/v/' <file3 >file1 rm -f file2 git update-index --add --remove file1 file2 file3 file4 git-commit -m 'Second Version' diff --git a/t/t4104-apply-boundary.sh b/t/t4104-apply-boundary.sh index 64f34e3298..43943ab8ca 100755 --- a/t/t4104-apply-boundary.sh +++ b/t/t4104-apply-boundary.sh @@ -112,4 +112,17 @@ do ' done +test_expect_success 'two lines' ' + + >file && + git add file && + echo aaa >file && + git diff >patch && + git add file && + echo bbb >file && + git add file && + test_must_fail git apply --check patch + +' + test_done diff --git a/t/t4105-apply-fuzz.sh b/t/t4105-apply-fuzz.sh index 0e8d25f18b..3266e39400 100755 --- a/t/t4105-apply-fuzz.sh +++ b/t/t4105-apply-fuzz.sh @@ -9,7 +9,7 @@ dotest () { test_expect_success "$name" " git checkout-index -f -q -u file && git apply $* && - diff -u expect file + test_cmp expect file " } diff --git a/t/t4116-apply-reverse.sh b/t/t4116-apply-reverse.sh index b1d35ab04d..c3f4579007 100755 --- a/t/t4116-apply-reverse.sh +++ b/t/t4116-apply-reverse.sh @@ -12,14 +12,14 @@ test_description='git apply in reverse test_expect_success setup ' for i in a b c d e f g h i j k l m n; do echo $i; done >file1 && - tr "ijk" '\''\000\001\002'\'' <file1 >file2 && + perl -pe "y/ijk/\\000\\001\\002/" <file1 >file2 && git add file1 file2 && git commit -m initial && git tag initial && for i in a b c g h i J K L m o n p q; do echo $i; done >file1 && - tr "mon" '\''\000\001\002'\'' <file1 >file2 && + perl -pe "y/mon/\\000\\001\\002/" <file1 >file2 && git commit -a -m second && git tag second && diff --git a/t/t4125-apply-ws-fuzz.sh b/t/t4125-apply-ws-fuzz.sh index d6f15be671..3b471b641b 100755 --- a/t/t4125-apply-ws-fuzz.sh +++ b/t/t4125-apply-ws-fuzz.sh @@ -56,7 +56,7 @@ test_expect_success nofix ' git apply --whitespace=nowarn patch-1 && # The result should obviously match. - diff -u file-1 file + test_cmp file-1 file ' test_expect_success 'withfix (forward)' ' @@ -70,7 +70,7 @@ test_expect_success 'withfix (forward)' ' git apply --whitespace=fix patch-0 && git apply --whitespace=fix patch-1 && - diff -u file-fixed file + test_cmp file-fixed file ' test_expect_success 'withfix (backward)' ' @@ -91,12 +91,12 @@ test_expect_success 'withfix (backward)' ' sed -e /h/d file-fixed >fixed-head && sed -e /h/d file >file-head && - diff -u fixed-head file-head && + test_cmp fixed-head file-head && sed -n -e /h/p file-fixed >fixed-tail && sed -n -e /h/p file >file-tail && - ! diff -u fixed-tail file-tail + ! test_cmp fixed-tail file-tail ' diff --git a/t/t4150-am-subdir.sh b/t/t4150-am-subdir.sh index 929d2cbd87..52069b469b 100755 --- a/t/t4150-am-subdir.sh +++ b/t/t4150-am-subdir.sh @@ -22,14 +22,14 @@ test_expect_success 'am regularly from stdin' ' git checkout initial && git am <patchfile && git diff master >actual && - diff -u expect actual + test_cmp expect actual ' test_expect_success 'am regularly from file' ' git checkout initial && git am patchfile && git diff master >actual && - diff -u expect actual + test_cmp expect actual ' test_expect_success 'am regularly from stdin in subdirectory' ' @@ -41,7 +41,7 @@ test_expect_success 'am regularly from stdin in subdirectory' ' git am <../patchfile ) && git diff master>actual && - diff -u expect actual + test_cmp expect actual ' test_expect_success 'am regularly from file in subdirectory' ' @@ -53,7 +53,7 @@ test_expect_success 'am regularly from file in subdirectory' ' git am ../patchfile ) && git diff master >actual && - diff -u expect actual + test_cmp expect actual ' test_expect_success 'am regularly from file in subdirectory with full path' ' @@ -66,7 +66,7 @@ test_expect_success 'am regularly from file in subdirectory with full path' ' git am "$P/patchfile" ) && git diff master >actual && - diff -u expect actual + test_cmp expect actual ' test_done diff --git a/t/t4200-rerere.sh b/t/t4200-rerere.sh index eeff3c9c07..3cbfee704e 100755 --- a/t/t4200-rerere.sh +++ b/t/t4200-rerere.sh @@ -129,7 +129,7 @@ test_expect_success 'rerere kicked in' "! grep ======= a1" test_expect_success 'rerere prefers first change' 'git diff a1 expect' rm $rr/postimage -echo "$sha1 a1" | tr '\012' '\000' > .git/rr-cache/MERGE_RR +echo "$sha1 a1" | perl -pe 'y/\012/\000/' > .git/rr-cache/MERGE_RR test_expect_success 'rerere clear' 'git rerere clear' diff --git a/t/t4201-shortlog.sh b/t/t4201-shortlog.sh index 6d12efb74d..405b971191 100755 --- a/t/t4201-shortlog.sh +++ b/t/t4201-shortlog.sh @@ -45,6 +45,11 @@ A U Thor (5): EOF -test_expect_success 'shortlog wrapping' 'diff -u expect out' +test_expect_success 'shortlog wrapping' 'test_cmp expect out' + +git log HEAD > log +GIT_DIR=non-existing git shortlog -w < log > out + +test_expect_success 'shortlog from non-git directory' 'test_cmp expect out' test_done diff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh index cd3c149800..c955fe44f5 100755 --- a/t/t5300-pack-object.sh +++ b/t/t5300-pack-object.sh @@ -15,7 +15,7 @@ test_expect_success \ 'rm -f .git/index* for i in a b c do - dd if=/dev/zero bs=4k count=1 | tr "\\000" $i >$i && + dd if=/dev/zero bs=4k count=1 | perl -pe "y/\\000/$i/" >$i && git update-index --add $i || return 1 done && cat c >d && echo foo >>d && git update-index --add d && diff --git a/t/t5302-pack-index.sh b/t/t5302-pack-index.sh index 67b9a7b84a..b88b5bbd02 100755 --- a/t/t5302-pack-index.sh +++ b/t/t5302-pack-index.sh @@ -103,7 +103,7 @@ test_expect_success \ test_expect_success \ '[index v1] 2) create a stealth corruption in a delta base reference' \ '# this test assumes a delta smaller than 16 bytes at the end of the pack - git show-index <1.idx | sort -n | tail -n 1 | ( + git show-index <1.idx | sort -n | sed -ne \$p | ( read delta_offs delta_sha1 && git cat-file blob "$delta_sha1" > blob_1 && chmod +w ".git/objects/pack/pack-${pack1}.pack" && @@ -141,7 +141,7 @@ test_expect_success \ test_expect_success \ '[index v2] 2) create a stealth corruption in a delta base reference' \ '# this test assumes a delta smaller than 16 bytes at the end of the pack - git show-index <1.idx | sort -n | tail -n 1 | ( + git show-index <1.idx | sort -n | sed -ne \$p | ( read delta_offs delta_sha1 delta_crc && git cat-file blob "$delta_sha1" > blob_3 && chmod +w ".git/objects/pack/pack-${pack1}.pack" && diff --git a/t/t5304-prune.sh b/t/t5304-prune.sh index 47090c4cf5..9fd9d07000 100644 --- a/t/t5304-prune.sh +++ b/t/t5304-prune.sh @@ -78,4 +78,38 @@ test_expect_success 'gc: start with ok gc.pruneExpire' ' ' +test_expect_success 'prune: prune nonsense parameters' ' + + test_must_fail git prune garbage && + test_must_fail git prune --- && + test_must_fail git prune --no-such-option + +' + +test_expect_success 'prune: prune unreachable heads' ' + + git config core.logAllRefUpdates false && + mv .git/logs .git/logs.old && + : > file2 && + git add file2 && + git commit -m temporary && + tmp_head=$(git rev-list -1 HEAD) && + git reset HEAD^ && + git prune && + test_must_fail git reset $tmp_head -- + +' + +test_expect_success 'prune: do not prune heads listed as an argument' ' + + : > file2 && + git add file2 && + git commit -m temporary && + tmp_head=$(git rev-list -1 HEAD) && + git reset HEAD^ && + git prune -- $tmp_head && + git reset $tmp_head -- + +' + test_done diff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh index 2d0c07fd6a..2b6b6e3f71 100755 --- a/t/t5400-send-pack.sh +++ b/t/t5400-send-pack.sh @@ -120,7 +120,7 @@ test_expect_success \ cd .. && git-clone parent child && cd child && git-push --all && cd ../parent && - git-branch -a >branches && ! grep -q origin/master branches + git-branch -a >branches && ! grep origin/master branches ' rewound_push_setup() { diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh index 2822a651b5..0a7fea865d 100755 --- a/t/t5505-remote.sh +++ b/t/t5505-remote.sh @@ -24,7 +24,7 @@ setup_repository () { tokens_match () { echo "$1" | tr ' ' '\012' | sort | sed -e '/^$/d' >expect && echo "$2" | tr ' ' '\012' | sort | sed -e '/^$/d' >actual && - diff -u expect actual + test_cmp expect actual } check_remote_track () { @@ -73,7 +73,7 @@ test_expect_success 'add another remote' ' sed -e "/^refs\/remotes\/origin\//d" \ -e "/^refs\/remotes\/second\//d" >actual && >expect && - diff -u expect actual + test_cmp expect actual ) ' @@ -93,7 +93,7 @@ test_expect_success 'remove remote' ' git for-each-ref "--format=%(refname)" refs/remotes | sed -e "/^refs\/remotes\/origin\//d" >actual && >expect && - diff -u expect actual + test_cmp expect actual ) ' @@ -106,6 +106,8 @@ cat > test/expect << EOF master Tracked remote branches side master + Local branches pushed with 'git push' + master:upstream +refs/tags/lastbackup EOF test_expect_success 'show' ' @@ -118,6 +120,10 @@ test_expect_success 'show' ' echo 1 > file && test_tick && git commit -m update file) && + git config remote.origin.push \ + refs/heads/master:refs/heads/upstream && + git config --add remote.origin.push \ + +refs/tags/lastbackup && git remote show origin > output && git diff expect output) ' @@ -237,4 +243,14 @@ test_expect_success 'update default (overridden, with funny whitespace)' ' ' +test_expect_success '"remote show" does not show symbolic refs' ' + + git clone one three && + (cd three && + git remote show origin > output && + ! grep HEAD < output && + ! grep -i stale < output) + +' + test_done diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh index 9b948c14e6..6946557c67 100755 --- a/t/t5510-fetch.sh +++ b/t/t5510-fetch.sh @@ -249,7 +249,7 @@ test_expect_success 'bundle should record HEAD correctly' ' do echo "$(git rev-parse --verify $h) $h" done >expect && - diff -u expect actual + test_cmp expect actual ' diff --git a/t/t5511-refspec.sh b/t/t5511-refspec.sh new file mode 100755 index 0000000000..670a8f1c99 --- /dev/null +++ b/t/t5511-refspec.sh @@ -0,0 +1,72 @@ +#!/bin/sh + +test_description='refspec parsing' + +. ./test-lib.sh + +test_refspec () { + + kind=$1 refspec=$2 expect=$3 + git config remote.frotz.url "." && + git config --remove-section remote.frotz && + git config remote.frotz.url "." && + git config "remote.frotz.$kind" "$refspec" && + if test "$expect" != invalid + then + title="$kind $refspec" + test='git ls-remote frotz' + else + title="$kind $refspec (invalid)" + test='test_must_fail git ls-remote frotz' + fi + test_expect_success "$title" "$test" +} + +test_refspec push '' invalid +test_refspec push ':' invalid + +test_refspec fetch '' +test_refspec fetch ':' + +test_refspec push 'refs/heads/*:refs/remotes/frotz/*' +test_refspec push 'refs/heads/*:refs/remotes/frotz' invalid +test_refspec push 'refs/heads:refs/remotes/frotz/*' invalid +test_refspec push 'refs/heads/master:refs/remotes/frotz/xyzzy' + + +# These have invalid LHS, but we do not have a formal "valid sha-1 +# expression syntax checker" so they are not checked with the current +# code. They will be caught downstream anyway, but we may want to +# have tighter check later... + +: test_refspec push 'refs/heads/master::refs/remotes/frotz/xyzzy' invalid +: test_refspec push 'refs/heads/maste :refs/remotes/frotz/xyzzy' invalid + +test_refspec fetch 'refs/heads/*:refs/remotes/frotz/*' +test_refspec fetch 'refs/heads/*:refs/remotes/frotz' invalid +test_refspec fetch 'refs/heads:refs/remotes/frotz/*' invalid +test_refspec fetch 'refs/heads/master:refs/remotes/frotz/xyzzy' +test_refspec fetch 'refs/heads/master::refs/remotes/frotz/xyzzy' invalid +test_refspec fetch 'refs/heads/maste :refs/remotes/frotz/xyzzy' invalid + +test_refspec push 'master~1:refs/remotes/frotz/backup' +test_refspec fetch 'master~1:refs/remotes/frotz/backup' invalid +test_refspec push 'HEAD~4:refs/remotes/frotz/new' +test_refspec fetch 'HEAD~4:refs/remotes/frotz/new' invalid + +test_refspec push 'HEAD' +test_refspec fetch 'HEAD' +test_refspec push 'refs/heads/ nitfol' invalid +test_refspec fetch 'refs/heads/ nitfol' invalid + +test_refspec push 'HEAD:' invalid +test_refspec fetch 'HEAD:' +test_refspec push 'refs/heads/ nitfol:' invalid +test_refspec fetch 'refs/heads/ nitfol:' invalid + +test_refspec push ':refs/remotes/frotz/deleteme' +test_refspec fetch ':refs/remotes/frotz/HEAD-to-me' +test_refspec push ':refs/remotes/frotz/delete me' invalid +test_refspec fetch ':refs/remotes/frotz/HEAD to me' invalid + +test_done diff --git a/t/t5512-ls-remote.sh b/t/t5512-ls-remote.sh index 6ec5f7c48b..c0dc94909b 100755 --- a/t/t5512-ls-remote.sh +++ b/t/t5512-ls-remote.sh @@ -24,28 +24,28 @@ test_expect_success setup ' test_expect_success 'ls-remote --tags .git' ' git ls-remote --tags .git >actual && - diff -u expected.tag actual + test_cmp expected.tag actual ' test_expect_success 'ls-remote .git' ' git ls-remote .git >actual && - diff -u expected.all actual + test_cmp expected.all actual ' test_expect_success 'ls-remote --tags self' ' git ls-remote --tags self >actual && - diff -u expected.tag actual + test_cmp expected.tag actual ' test_expect_success 'ls-remote self' ' git ls-remote self >actual && - diff -u expected.all actual + test_cmp expected.all actual ' diff --git a/t/t5515-fetch-merge-logic.sh b/t/t5515-fetch-merge-logic.sh index 31c1081617..65c37744aa 100755 --- a/t/t5515-fetch-merge-logic.sh +++ b/t/t5515-fetch-merge-logic.sh @@ -131,8 +131,10 @@ do test=`echo "$cmd" | sed -e 's|[/ ][/ ]*|_|g'` cnt=`expr $test_count + 1` pfx=`printf "%04d" $cnt` - expect="../../t5515/fetch.$test" - actual="$pfx-fetch.$test" + expect_f="../../t5515/fetch.$test" + actual_f="$pfx-fetch.$test" + expect_r="../../t5515/refs.$test" + actual_r="$pfx-refs.$test" test_expect_success "$cmd" ' { @@ -145,14 +147,24 @@ do rm -f .git/refs/tags/* git fetch "$@" >/dev/null cat .git/FETCH_HEAD - } >"$actual" && - if test -f "$expect" + } >"$actual_f" && + git show-ref >"$actual_r" && + if test -f "$expect_f" then - git diff -u "$expect" "$actual" && - rm -f "$actual" + git diff -u "$expect_f" "$actual_f" && + rm -f "$actual_f" else # this is to help developing new tests. - cp "$actual" "$expect" + cp "$actual_f" "$expect_f" + false + fi && + if test -f "$expect_r" + then + git diff -u "$expect_r" "$actual_r" && + rm -f "$actual_r" + else + # this is to help developing new tests. + cp "$actual_r" "$expect_r" false fi ' diff --git a/t/t5515/refs.br-branches-default b/t/t5515/refs.br-branches-default new file mode 100644 index 0000000000..21917c1e5d --- /dev/null +++ b/t/t5515/refs.br-branches-default @@ -0,0 +1,12 @@ +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/heads/branches-default +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-branches-default-merge b/t/t5515/refs.br-branches-default-merge new file mode 100644 index 0000000000..21917c1e5d --- /dev/null +++ b/t/t5515/refs.br-branches-default-merge @@ -0,0 +1,12 @@ +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/heads/branches-default +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-branches-default-merge_branches-default b/t/t5515/refs.br-branches-default-merge_branches-default new file mode 100644 index 0000000000..21917c1e5d --- /dev/null +++ b/t/t5515/refs.br-branches-default-merge_branches-default @@ -0,0 +1,12 @@ +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/heads/branches-default +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-branches-default-octopus b/t/t5515/refs.br-branches-default-octopus new file mode 100644 index 0000000000..21917c1e5d --- /dev/null +++ b/t/t5515/refs.br-branches-default-octopus @@ -0,0 +1,12 @@ +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/heads/branches-default +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-branches-default-octopus_branches-default b/t/t5515/refs.br-branches-default-octopus_branches-default new file mode 100644 index 0000000000..21917c1e5d --- /dev/null +++ b/t/t5515/refs.br-branches-default-octopus_branches-default @@ -0,0 +1,12 @@ +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/heads/branches-default +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-branches-default_branches-default b/t/t5515/refs.br-branches-default_branches-default new file mode 100644 index 0000000000..21917c1e5d --- /dev/null +++ b/t/t5515/refs.br-branches-default_branches-default @@ -0,0 +1,12 @@ +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/heads/branches-default +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-branches-one b/t/t5515/refs.br-branches-one new file mode 100644 index 0000000000..8a705a5df2 --- /dev/null +++ b/t/t5515/refs.br-branches-one @@ -0,0 +1,12 @@ +8e32a6d901327a23ef831511badce7bf3bf46689 refs/heads/branches-one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-branches-one-merge b/t/t5515/refs.br-branches-one-merge new file mode 100644 index 0000000000..8a705a5df2 --- /dev/null +++ b/t/t5515/refs.br-branches-one-merge @@ -0,0 +1,12 @@ +8e32a6d901327a23ef831511badce7bf3bf46689 refs/heads/branches-one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-branches-one-merge_branches-one b/t/t5515/refs.br-branches-one-merge_branches-one new file mode 100644 index 0000000000..8a705a5df2 --- /dev/null +++ b/t/t5515/refs.br-branches-one-merge_branches-one @@ -0,0 +1,12 @@ +8e32a6d901327a23ef831511badce7bf3bf46689 refs/heads/branches-one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-branches-one-octopus b/t/t5515/refs.br-branches-one-octopus new file mode 100644 index 0000000000..8a705a5df2 --- /dev/null +++ b/t/t5515/refs.br-branches-one-octopus @@ -0,0 +1,12 @@ +8e32a6d901327a23ef831511badce7bf3bf46689 refs/heads/branches-one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-branches-one-octopus_branches-one b/t/t5515/refs.br-branches-one-octopus_branches-one new file mode 100644 index 0000000000..8a705a5df2 --- /dev/null +++ b/t/t5515/refs.br-branches-one-octopus_branches-one @@ -0,0 +1,12 @@ +8e32a6d901327a23ef831511badce7bf3bf46689 refs/heads/branches-one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-branches-one_branches-one b/t/t5515/refs.br-branches-one_branches-one new file mode 100644 index 0000000000..8a705a5df2 --- /dev/null +++ b/t/t5515/refs.br-branches-one_branches-one @@ -0,0 +1,12 @@ +8e32a6d901327a23ef831511badce7bf3bf46689 refs/heads/branches-one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-config-explicit b/t/t5515/refs.br-config-explicit new file mode 100644 index 0000000000..9bbbfd9fc5 --- /dev/null +++ b/t/t5515/refs.br-config-explicit @@ -0,0 +1,15 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/rem/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/rem/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/rem/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/rem/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-config-explicit-merge b/t/t5515/refs.br-config-explicit-merge new file mode 100644 index 0000000000..9bbbfd9fc5 --- /dev/null +++ b/t/t5515/refs.br-config-explicit-merge @@ -0,0 +1,15 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/rem/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/rem/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/rem/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/rem/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-config-explicit-merge_config-explicit b/t/t5515/refs.br-config-explicit-merge_config-explicit new file mode 100644 index 0000000000..9bbbfd9fc5 --- /dev/null +++ b/t/t5515/refs.br-config-explicit-merge_config-explicit @@ -0,0 +1,15 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/rem/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/rem/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/rem/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/rem/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-config-explicit-octopus b/t/t5515/refs.br-config-explicit-octopus new file mode 100644 index 0000000000..9bbbfd9fc5 --- /dev/null +++ b/t/t5515/refs.br-config-explicit-octopus @@ -0,0 +1,15 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/rem/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/rem/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/rem/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/rem/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-config-explicit-octopus_config-explicit b/t/t5515/refs.br-config-explicit-octopus_config-explicit new file mode 100644 index 0000000000..9bbbfd9fc5 --- /dev/null +++ b/t/t5515/refs.br-config-explicit-octopus_config-explicit @@ -0,0 +1,15 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/rem/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/rem/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/rem/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/rem/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-config-explicit_config-explicit b/t/t5515/refs.br-config-explicit_config-explicit new file mode 100644 index 0000000000..9bbbfd9fc5 --- /dev/null +++ b/t/t5515/refs.br-config-explicit_config-explicit @@ -0,0 +1,15 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/rem/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/rem/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/rem/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/rem/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-config-glob b/t/t5515/refs.br-config-glob new file mode 100644 index 0000000000..9bbbfd9fc5 --- /dev/null +++ b/t/t5515/refs.br-config-glob @@ -0,0 +1,15 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/rem/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/rem/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/rem/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/rem/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-config-glob-merge b/t/t5515/refs.br-config-glob-merge new file mode 100644 index 0000000000..9bbbfd9fc5 --- /dev/null +++ b/t/t5515/refs.br-config-glob-merge @@ -0,0 +1,15 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/rem/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/rem/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/rem/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/rem/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-config-glob-merge_config-glob b/t/t5515/refs.br-config-glob-merge_config-glob new file mode 100644 index 0000000000..9bbbfd9fc5 --- /dev/null +++ b/t/t5515/refs.br-config-glob-merge_config-glob @@ -0,0 +1,15 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/rem/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/rem/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/rem/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/rem/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-config-glob-octopus b/t/t5515/refs.br-config-glob-octopus new file mode 100644 index 0000000000..9bbbfd9fc5 --- /dev/null +++ b/t/t5515/refs.br-config-glob-octopus @@ -0,0 +1,15 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/rem/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/rem/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/rem/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/rem/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-config-glob-octopus_config-glob b/t/t5515/refs.br-config-glob-octopus_config-glob new file mode 100644 index 0000000000..9bbbfd9fc5 --- /dev/null +++ b/t/t5515/refs.br-config-glob-octopus_config-glob @@ -0,0 +1,15 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/rem/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/rem/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/rem/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/rem/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-config-glob_config-glob b/t/t5515/refs.br-config-glob_config-glob new file mode 100644 index 0000000000..9bbbfd9fc5 --- /dev/null +++ b/t/t5515/refs.br-config-glob_config-glob @@ -0,0 +1,15 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/rem/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/rem/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/rem/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/rem/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-remote-explicit b/t/t5515/refs.br-remote-explicit new file mode 100644 index 0000000000..9bbbfd9fc5 --- /dev/null +++ b/t/t5515/refs.br-remote-explicit @@ -0,0 +1,15 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/rem/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/rem/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/rem/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/rem/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-remote-explicit-merge b/t/t5515/refs.br-remote-explicit-merge new file mode 100644 index 0000000000..9bbbfd9fc5 --- /dev/null +++ b/t/t5515/refs.br-remote-explicit-merge @@ -0,0 +1,15 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/rem/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/rem/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/rem/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/rem/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-remote-explicit-merge_remote-explicit b/t/t5515/refs.br-remote-explicit-merge_remote-explicit new file mode 100644 index 0000000000..9bbbfd9fc5 --- /dev/null +++ b/t/t5515/refs.br-remote-explicit-merge_remote-explicit @@ -0,0 +1,15 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/rem/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/rem/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/rem/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/rem/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-remote-explicit-octopus b/t/t5515/refs.br-remote-explicit-octopus new file mode 100644 index 0000000000..9bbbfd9fc5 --- /dev/null +++ b/t/t5515/refs.br-remote-explicit-octopus @@ -0,0 +1,15 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/rem/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/rem/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/rem/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/rem/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-remote-explicit-octopus_remote-explicit b/t/t5515/refs.br-remote-explicit-octopus_remote-explicit new file mode 100644 index 0000000000..9bbbfd9fc5 --- /dev/null +++ b/t/t5515/refs.br-remote-explicit-octopus_remote-explicit @@ -0,0 +1,15 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/rem/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/rem/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/rem/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/rem/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-remote-explicit_remote-explicit b/t/t5515/refs.br-remote-explicit_remote-explicit new file mode 100644 index 0000000000..9bbbfd9fc5 --- /dev/null +++ b/t/t5515/refs.br-remote-explicit_remote-explicit @@ -0,0 +1,15 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/rem/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/rem/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/rem/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/rem/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-remote-glob b/t/t5515/refs.br-remote-glob new file mode 100644 index 0000000000..9bbbfd9fc5 --- /dev/null +++ b/t/t5515/refs.br-remote-glob @@ -0,0 +1,15 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/rem/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/rem/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/rem/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/rem/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-remote-glob-merge b/t/t5515/refs.br-remote-glob-merge new file mode 100644 index 0000000000..9bbbfd9fc5 --- /dev/null +++ b/t/t5515/refs.br-remote-glob-merge @@ -0,0 +1,15 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/rem/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/rem/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/rem/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/rem/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-remote-glob-merge_remote-glob b/t/t5515/refs.br-remote-glob-merge_remote-glob new file mode 100644 index 0000000000..9bbbfd9fc5 --- /dev/null +++ b/t/t5515/refs.br-remote-glob-merge_remote-glob @@ -0,0 +1,15 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/rem/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/rem/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/rem/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/rem/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-remote-glob-octopus b/t/t5515/refs.br-remote-glob-octopus new file mode 100644 index 0000000000..9bbbfd9fc5 --- /dev/null +++ b/t/t5515/refs.br-remote-glob-octopus @@ -0,0 +1,15 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/rem/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/rem/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/rem/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/rem/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-remote-glob-octopus_remote-glob b/t/t5515/refs.br-remote-glob-octopus_remote-glob new file mode 100644 index 0000000000..9bbbfd9fc5 --- /dev/null +++ b/t/t5515/refs.br-remote-glob-octopus_remote-glob @@ -0,0 +1,15 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/rem/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/rem/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/rem/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/rem/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-remote-glob_remote-glob b/t/t5515/refs.br-remote-glob_remote-glob new file mode 100644 index 0000000000..9bbbfd9fc5 --- /dev/null +++ b/t/t5515/refs.br-remote-glob_remote-glob @@ -0,0 +1,15 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/rem/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/rem/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/rem/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/rem/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-unconfig b/t/t5515/refs.br-unconfig new file mode 100644 index 0000000000..13e4ad2e46 --- /dev/null +++ b/t/t5515/refs.br-unconfig @@ -0,0 +1,11 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-unconfig_--tags_.._.git b/t/t5515/refs.br-unconfig_--tags_.._.git new file mode 100644 index 0000000000..13e4ad2e46 --- /dev/null +++ b/t/t5515/refs.br-unconfig_--tags_.._.git @@ -0,0 +1,11 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-unconfig_.._.git b/t/t5515/refs.br-unconfig_.._.git new file mode 100644 index 0000000000..70962eaac1 --- /dev/null +++ b/t/t5515/refs.br-unconfig_.._.git @@ -0,0 +1,5 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two diff --git a/t/t5515/refs.br-unconfig_.._.git_one b/t/t5515/refs.br-unconfig_.._.git_one new file mode 100644 index 0000000000..70962eaac1 --- /dev/null +++ b/t/t5515/refs.br-unconfig_.._.git_one @@ -0,0 +1,5 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two diff --git a/t/t5515/refs.br-unconfig_.._.git_one_tag_tag-one_tag_tag-three-file b/t/t5515/refs.br-unconfig_.._.git_one_tag_tag-one_tag_tag-three-file new file mode 100644 index 0000000000..13e4ad2e46 --- /dev/null +++ b/t/t5515/refs.br-unconfig_.._.git_one_tag_tag-one_tag_tag-three-file @@ -0,0 +1,11 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-unconfig_.._.git_one_two b/t/t5515/refs.br-unconfig_.._.git_one_two new file mode 100644 index 0000000000..70962eaac1 --- /dev/null +++ b/t/t5515/refs.br-unconfig_.._.git_one_two @@ -0,0 +1,5 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two diff --git a/t/t5515/refs.br-unconfig_.._.git_tag_tag-one-tree_tag_tag-three-file b/t/t5515/refs.br-unconfig_.._.git_tag_tag-one-tree_tag_tag-three-file new file mode 100644 index 0000000000..13e4ad2e46 --- /dev/null +++ b/t/t5515/refs.br-unconfig_.._.git_tag_tag-one-tree_tag_tag-three-file @@ -0,0 +1,11 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-unconfig_.._.git_tag_tag-one_tag_tag-three b/t/t5515/refs.br-unconfig_.._.git_tag_tag-one_tag_tag-three new file mode 100644 index 0000000000..13e4ad2e46 --- /dev/null +++ b/t/t5515/refs.br-unconfig_.._.git_tag_tag-one_tag_tag-three @@ -0,0 +1,11 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-unconfig_branches-default b/t/t5515/refs.br-unconfig_branches-default new file mode 100644 index 0000000000..21917c1e5d --- /dev/null +++ b/t/t5515/refs.br-unconfig_branches-default @@ -0,0 +1,12 @@ +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/heads/branches-default +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-unconfig_branches-one b/t/t5515/refs.br-unconfig_branches-one new file mode 100644 index 0000000000..8a705a5df2 --- /dev/null +++ b/t/t5515/refs.br-unconfig_branches-one @@ -0,0 +1,12 @@ +8e32a6d901327a23ef831511badce7bf3bf46689 refs/heads/branches-one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-unconfig_config-explicit b/t/t5515/refs.br-unconfig_config-explicit new file mode 100644 index 0000000000..9bbbfd9fc5 --- /dev/null +++ b/t/t5515/refs.br-unconfig_config-explicit @@ -0,0 +1,15 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/rem/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/rem/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/rem/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/rem/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-unconfig_config-glob b/t/t5515/refs.br-unconfig_config-glob new file mode 100644 index 0000000000..9bbbfd9fc5 --- /dev/null +++ b/t/t5515/refs.br-unconfig_config-glob @@ -0,0 +1,15 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/rem/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/rem/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/rem/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/rem/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-unconfig_remote-explicit b/t/t5515/refs.br-unconfig_remote-explicit new file mode 100644 index 0000000000..9bbbfd9fc5 --- /dev/null +++ b/t/t5515/refs.br-unconfig_remote-explicit @@ -0,0 +1,15 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/rem/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/rem/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/rem/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/rem/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.br-unconfig_remote-glob b/t/t5515/refs.br-unconfig_remote-glob new file mode 100644 index 0000000000..9bbbfd9fc5 --- /dev/null +++ b/t/t5515/refs.br-unconfig_remote-glob @@ -0,0 +1,15 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/rem/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/rem/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/rem/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/rem/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.master b/t/t5515/refs.master new file mode 100644 index 0000000000..13e4ad2e46 --- /dev/null +++ b/t/t5515/refs.master @@ -0,0 +1,11 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.master_--tags_.._.git b/t/t5515/refs.master_--tags_.._.git new file mode 100644 index 0000000000..13e4ad2e46 --- /dev/null +++ b/t/t5515/refs.master_--tags_.._.git @@ -0,0 +1,11 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.master_.._.git b/t/t5515/refs.master_.._.git new file mode 100644 index 0000000000..70962eaac1 --- /dev/null +++ b/t/t5515/refs.master_.._.git @@ -0,0 +1,5 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two diff --git a/t/t5515/refs.master_.._.git_one b/t/t5515/refs.master_.._.git_one new file mode 100644 index 0000000000..70962eaac1 --- /dev/null +++ b/t/t5515/refs.master_.._.git_one @@ -0,0 +1,5 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two diff --git a/t/t5515/refs.master_.._.git_one_tag_tag-one_tag_tag-three-file b/t/t5515/refs.master_.._.git_one_tag_tag-one_tag_tag-three-file new file mode 100644 index 0000000000..13e4ad2e46 --- /dev/null +++ b/t/t5515/refs.master_.._.git_one_tag_tag-one_tag_tag-three-file @@ -0,0 +1,11 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.master_.._.git_one_two b/t/t5515/refs.master_.._.git_one_two new file mode 100644 index 0000000000..70962eaac1 --- /dev/null +++ b/t/t5515/refs.master_.._.git_one_two @@ -0,0 +1,5 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two diff --git a/t/t5515/refs.master_.._.git_tag_tag-one-tree_tag_tag-three-file b/t/t5515/refs.master_.._.git_tag_tag-one-tree_tag_tag-three-file new file mode 100644 index 0000000000..13e4ad2e46 --- /dev/null +++ b/t/t5515/refs.master_.._.git_tag_tag-one-tree_tag_tag-three-file @@ -0,0 +1,11 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.master_.._.git_tag_tag-one_tag_tag-three b/t/t5515/refs.master_.._.git_tag_tag-one_tag_tag-three new file mode 100644 index 0000000000..13e4ad2e46 --- /dev/null +++ b/t/t5515/refs.master_.._.git_tag_tag-one_tag_tag-three @@ -0,0 +1,11 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.master_branches-default b/t/t5515/refs.master_branches-default new file mode 100644 index 0000000000..21917c1e5d --- /dev/null +++ b/t/t5515/refs.master_branches-default @@ -0,0 +1,12 @@ +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/heads/branches-default +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.master_branches-one b/t/t5515/refs.master_branches-one new file mode 100644 index 0000000000..8a705a5df2 --- /dev/null +++ b/t/t5515/refs.master_branches-one @@ -0,0 +1,12 @@ +8e32a6d901327a23ef831511badce7bf3bf46689 refs/heads/branches-one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.master_config-explicit b/t/t5515/refs.master_config-explicit new file mode 100644 index 0000000000..9bbbfd9fc5 --- /dev/null +++ b/t/t5515/refs.master_config-explicit @@ -0,0 +1,15 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/rem/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/rem/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/rem/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/rem/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.master_config-glob b/t/t5515/refs.master_config-glob new file mode 100644 index 0000000000..9bbbfd9fc5 --- /dev/null +++ b/t/t5515/refs.master_config-glob @@ -0,0 +1,15 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/rem/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/rem/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/rem/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/rem/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.master_remote-explicit b/t/t5515/refs.master_remote-explicit new file mode 100644 index 0000000000..9bbbfd9fc5 --- /dev/null +++ b/t/t5515/refs.master_remote-explicit @@ -0,0 +1,15 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/rem/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/rem/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/rem/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/rem/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t5515/refs.master_remote-glob b/t/t5515/refs.master_remote-glob new file mode 100644 index 0000000000..9bbbfd9fc5 --- /dev/null +++ b/t/t5515/refs.master_remote-glob @@ -0,0 +1,15 @@ +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/HEAD +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/origin/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/origin/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/origin/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/origin/two +754b754407bf032e9a2f9d5a9ad05ca79a6b228f refs/remotes/rem/master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/remotes/rem/one +0567da4d5edd2ff4bb292a465ba9e64dcad9536b refs/remotes/rem/three +6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 refs/remotes/rem/two +6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 refs/tags/tag-master +8e32a6d901327a23ef831511badce7bf3bf46689 refs/tags/tag-one +22feea448b023a2d864ef94b013735af34d238ba refs/tags/tag-one-tree +c61a82b60967180544e3c19f819ddbd0c9f89899 refs/tags/tag-three +0e3b14047d3ee365f4f2a1b673db059c3972589c refs/tags/tag-three-file +525b7fb068d59950d185a8779dc957c77eed73ba refs/tags/tag-two diff --git a/t/t6000lib.sh b/t/t6000lib.sh index 180633e1e0..c0baaa5360 100755 --- a/t/t6000lib.sh +++ b/t/t6000lib.sh @@ -97,7 +97,13 @@ check_output() # from front and back. name_from_description() { - tr "'" '-' | tr '~`!@#$%^&*()_+={}[]|\;:"<>,/? ' '-' | tr -s '-' | tr '[A-Z]' '[a-z]' | sed "s/^-*//;s/-*\$//" + perl -pe ' + s/[^A-Za-z0-9.]/-/g; + s/-+/-/g; + s/-$//; + s/^-//; + y/A-Z/a-z/; + ' } diff --git a/t/t6004-rev-list-path-optim.sh b/t/t6004-rev-list-path-optim.sh index 80d71988b8..5dabf1c5e3 100755 --- a/t/t6004-rev-list-path-optim.sh +++ b/t/t6004-rev-list-path-optim.sh @@ -45,7 +45,7 @@ test_expect_success 'further setup' ' test_expect_success 'path optimization 2' ' ( echo "$side"; echo "$initial" ) >expected && git rev-list HEAD -- a >actual && - diff -u expected actual + test_cmp expected actual ' test_done diff --git a/t/t6009-rev-list-parent.sh b/t/t6009-rev-list-parent.sh index be3d238d99..c8a96a9a99 100755 --- a/t/t6009-rev-list-parent.sh +++ b/t/t6009-rev-list-parent.sh @@ -27,11 +27,11 @@ test_expect_success setup ' git log --pretty=oneline --abbrev-commit ' -test_expect_failure 'one is ancestor of others and should not be shown' ' +test_expect_success 'one is ancestor of others and should not be shown' ' git rev-list one --not four >result && >expect && - diff -u expect result + test_cmp expect result ' diff --git a/t/t6027-merge-binary.sh b/t/t6027-merge-binary.sh index a7358f75b1..92ca1f0f8c 100755 --- a/t/t6027-merge-binary.sh +++ b/t/t6027-merge-binary.sh @@ -45,7 +45,7 @@ test_expect_success resolve ' false else git ls-files -s >current - diff -u current expect + test_cmp current expect fi ' @@ -60,7 +60,7 @@ test_expect_success recursive ' false else git ls-files -s >current - diff -u current expect + test_cmp current expect fi ' diff --git a/t/t6029-merge-subtree.sh b/t/t6029-merge-subtree.sh index 35d66e8044..43f5459c35 100755 --- a/t/t6029-merge-subtree.sh +++ b/t/t6029-merge-subtree.sh @@ -25,7 +25,7 @@ test_expect_success 'subtree available and works like recursive' ' git merge -s subtree side && for i in mundo $s world; do echo $i; done >expect && - diff -u expect hello + test_cmp expect hello ' diff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh index 4908e878fe..f471c1526f 100755 --- a/t/t6030-bisect-porcelain.sh +++ b/t/t6030-bisect-porcelain.sh @@ -219,7 +219,7 @@ test_expect_success 'bisect run & skip: cannot tell between 2' ' add_line_into_file "6: Yet a line." hello && HASH6=$(git rev-parse --verify HEAD) && echo "#"\!"/bin/sh" > test_script.sh && - echo "tail -1 hello | grep Ciao > /dev/null && exit 125" >> test_script.sh && + echo "sed -ne \\\$p hello | grep Ciao > /dev/null && exit 125" >> test_script.sh && echo "grep line hello > /dev/null" >> test_script.sh && echo "test \$? -ne 0" >> test_script.sh && chmod +x test_script.sh && @@ -244,8 +244,8 @@ test_expect_success 'bisect run & skip: find first bad' ' add_line_into_file "7: Should be the last line." hello && HASH7=$(git rev-parse --verify HEAD) && echo "#"\!"/bin/sh" > test_script.sh && - echo "tail -1 hello | grep Ciao > /dev/null && exit 125" >> test_script.sh && - echo "tail -1 hello | grep day > /dev/null && exit 125" >> test_script.sh && + echo "sed -ne \\\$p hello | grep Ciao > /dev/null && exit 125" >> test_script.sh && + echo "sed -ne \\\$p hello | grep day > /dev/null && exit 125" >> test_script.sh && echo "grep Yet hello > /dev/null" >> test_script.sh && echo "test \$? -ne 0" >> test_script.sh && chmod +x test_script.sh && diff --git a/t/t6031-merge-recursive.sh b/t/t6031-merge-recursive.sh index 5bb6b93780..c8310aee4f 100755 --- a/t/t6031-merge-recursive.sh +++ b/t/t6031-merge-recursive.sh @@ -42,7 +42,7 @@ test_expect_success 'mode change in both branches: expect conflict' ' echo "100755 $H 2 file2" echo "100644 $H 3 file2" ) >expect && - diff -u actual expect && + test_cmp actual expect && test -x file2 ' diff --git a/t/t7003-filter-branch.sh b/t/t7003-filter-branch.sh index 6e14bf1c7f..efd658adb6 100755 --- a/t/t7003-filter-branch.sh +++ b/t/t7003-filter-branch.sh @@ -4,7 +4,7 @@ test_description='git-filter-branch' . ./test-lib.sh make_commit () { - lower=$(echo $1 | tr A-Z a-z) + lower=$(echo $1 | tr '[A-Z]' '[a-z]') echo $lower > $lower git add $lower test_tick @@ -17,6 +17,8 @@ test_expect_success 'setup' ' make_commit B git checkout -b branch B make_commit D + mkdir dir + make_commit dir/D make_commit E git checkout master make_commit C @@ -41,9 +43,23 @@ test_expect_success 'rewrite, renaming a specific file' ' ' test_expect_success 'test that the file was renamed' ' - test d = $(git show HEAD:doh) && + test d = "$(git show HEAD:doh --)" && + ! test -f d && test -f doh && - test d = $(cat doh) + test d = "$(cat doh)" +' + +test_expect_success 'rewrite, renaming a specific directory' ' + git-filter-branch -f --tree-filter "mv dir diroh || :" HEAD +' + +test_expect_success 'test that the directory was renamed' ' + test dir/d = "$(git show HEAD:diroh/d --)" && + ! test -d dir && + test -d diroh && + ! test -d diroh/dir && + test -f diroh/d && + test dir/d = "$(cat diroh/d)" ' git tag oldD HEAD~4 @@ -78,7 +94,7 @@ test_expect_success 'filter subdirectory only' ' test_expect_success 'subdirectory filter result looks okay' ' test 2 = $(git rev-list sub | wc -l) && git show sub:new && - ! git show sub:subdir + test_must_fail git show sub:subdir ' test_expect_success 'setup and filter history that requires --full-history' ' @@ -100,7 +116,7 @@ test_expect_success 'subdirectory filter result looks okay' ' test 3 = $(git rev-list -1 --parents sub-master | wc -w) && git show sub-master^:new && git show sub-master^2:new && - ! git show sub:subdir + test_must_fail git show sub:subdir ' test_expect_success 'use index-filter to move into a subdirectory' ' @@ -114,7 +130,7 @@ test_expect_success 'use index-filter to move into a subdirectory' ' test_expect_success 'stops when msg filter fails' ' old=$(git rev-parse HEAD) && - ! git-filter-branch -f --msg-filter false HEAD && + test_must_fail git-filter-branch -f --msg-filter false HEAD && test $old = $(git rev-parse HEAD) && rm -rf .git-rewrite ' @@ -151,8 +167,8 @@ test_expect_success "remove a certain author's commits" ' ' test_expect_success 'barf on invalid name' ' - ! git filter-branch -f master xy-problem && - ! git filter-branch -f HEAD^ + test_must_fail git filter-branch -f master xy-problem && + test_must_fail git filter-branch -f HEAD^ ' test_expect_success '"map" works in commit filter' ' @@ -174,7 +190,7 @@ test_expect_success 'Name needing quotes' ' git add foo && git commit -m "Adding a file" && git filter-branch --tree-filter "rm -fr foo" && - ! git ls-files --error-unmatch "foo/$name" && + test_must_fail git ls-files --error-unmatch "foo/$name" && test $(git rev-parse --verify rerere) != $(git rev-parse --verify A) ' diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh index 75cd33bde8..1a7141ecd7 100755 --- a/t/t7004-tag.sh +++ b/t/t7004-tag.sh @@ -578,6 +578,14 @@ test_expect_success \ git diff expect actual ' +# subsequent tests require gpg; check if it is available +gpg --version >/dev/null +if [ $? -eq 127 ]; then + echo "gpg not found - skipping tag signing and verification tests" + test_done + exit +fi + # trying to verify annotated non-signed tags: test_expect_success \ @@ -600,13 +608,6 @@ test_expect_success \ # creating and verifying signed tags: -gpg --version >/dev/null -if [ $? -eq 127 ]; then - echo "Skipping signed tags tests, because gpg was not found" - test_done - exit -fi - # As said here: http://www.gnupg.org/documentation/faqs.html#q6.19 # the gpg version 1.0.6 didn't parse trust packets correctly, so for # that version, creation of signed tags using the generated key fails. diff --git a/t/t7005-editor.sh b/t/t7005-editor.sh index 6a74b3acfd..2d919d69ef 100755 --- a/t/t7005-editor.sh +++ b/t/t7005-editor.sh @@ -4,8 +4,6 @@ test_description='GIT_EDITOR, core.editor, and stuff' . ./test-lib.sh -OLD_TERM="$TERM" - for i in GIT_EDITOR core_editor EDITOR VISUAL vi do cat >e-$i.sh <<-EOF @@ -116,6 +114,4 @@ test_expect_success 'core.editor with a space' ' ' -TERM="$OLD_TERM" - test_done diff --git a/t/t7010-setup.sh b/t/t7010-setup.sh index bc8ab6a619..02cf7c5c9d 100755 --- a/t/t7010-setup.sh +++ b/t/t7010-setup.sh @@ -18,7 +18,7 @@ test_expect_success 'git add (absolute)' ' git add "$D/a/b/c/d" && git ls-files >current && echo a/b/c/d >expect && - diff -u expect current + test_cmp expect current ' @@ -32,7 +32,7 @@ test_expect_success 'git add (funny relative)' ' ) && git ls-files >current && echo a/e/f >expect && - diff -u expect current + test_cmp expect current ' @@ -43,7 +43,7 @@ test_expect_success 'git rm (absolute)' ' git rm -f --cached "$D/a/b/c/d" && git ls-files >current && echo a/e/f >expect && - diff -u expect current + test_cmp expect current ' @@ -57,7 +57,7 @@ test_expect_success 'git rm (funny relative)' ' ) && git ls-files >current && echo a/b/c/d >expect && - diff -u expect current + test_cmp expect current ' @@ -67,7 +67,7 @@ test_expect_success 'git ls-files (absolute)' ' git add a && git ls-files "$D/a/e/../b" >current && echo a/b/c/d >expect && - diff -u expect current + test_cmp expect current ' @@ -80,7 +80,7 @@ test_expect_success 'git ls-files (relative #1)' ' git ls-files "../b/c" ) >current && echo c/d >expect && - diff -u expect current + test_cmp expect current ' @@ -93,7 +93,7 @@ test_expect_success 'git ls-files (relative #2)' ' git ls-files --full-name "../e/f" ) >current && echo a/e/f >expect && - diff -u expect current + test_cmp expect current ' @@ -126,13 +126,13 @@ test_expect_success 'log using absolute path names' ' git log a/b/c/d >f1.txt && git log "$(pwd)/a/b/c/d" >f2.txt && - diff -u f1.txt f2.txt + test_cmp f1.txt f2.txt ' test_expect_success 'blame using absolute path names' ' git blame a/b/c/d >f1.txt && git blame "$(pwd)/a/b/c/d" >f2.txt && - diff -u f1.txt f2.txt + test_cmp f1.txt f2.txt ' test_expect_success 'setup deeper work tree' ' diff --git a/t/t7201-co.sh b/t/t7201-co.sh index 63915cd87b..3111baa9e3 100755 --- a/t/t7201-co.sh +++ b/t/t7201-co.sh @@ -83,13 +83,13 @@ test_expect_success "checkout with unrelated dirty tree without -m" ' fill 0 1 2 3 4 5 6 7 8 >same && cp same kept git checkout side >messages && - diff -u same kept + test_cmp same kept (cat > messages.expect <<EOF M same EOF ) && touch messages.expect && - diff -u messages.expect messages + test_cmp messages.expect messages ' test_expect_success "checkout -m with dirty tree" ' @@ -106,19 +106,19 @@ test_expect_success "checkout -m with dirty tree" ' M one EOF ) && - diff -u expect.messages messages && + test_cmp expect.messages messages && fill "M one" "A three" "D two" >expect.master && git diff --name-status master >current.master && - diff -u expect.master current.master && + test_cmp expect.master current.master && fill "M one" >expect.side && git diff --name-status side >current.side && - diff -u expect.side current.side && + test_cmp expect.side current.side && : >expect.index && git diff --cached >current.index && - diff -u expect.index current.index + test_cmp expect.index current.index ' test_expect_success "checkout -m with dirty tree, renamed" ' @@ -136,7 +136,7 @@ test_expect_success "checkout -m with dirty tree, renamed" ' git checkout -m renamer && fill 1 3 4 5 7 8 >expect && - diff -u expect uno && + test_cmp expect uno && ! test -f one && git diff --cached >current && ! test -s current @@ -161,7 +161,7 @@ test_expect_success 'checkout -m with merge conflict' ' git diff master:one :3:uno | sed -e "1,/^@@/d" -e "/^ /d" -e "s/^-/d/" -e "s/^+/a/" >current && fill d2 aT d7 aS >expect && - diff -u current expect && + test_cmp current expect && git diff --cached two >current && ! test -s current ' @@ -178,7 +178,7 @@ If you want to create a new branch from this checkout, you may do so HEAD is now at 7329388... Initial A one, A two EOF ) && - diff -u messages.expect messages && + test_cmp messages.expect messages && H=$(git rev-parse --verify HEAD) && M=$(git show-ref -s --verify refs/heads/master) && test "z$H" = "z$M" && diff --git a/t/t7401-submodule-summary.sh b/t/t7401-submodule-summary.sh new file mode 100755 index 0000000000..0f3c42ab35 --- /dev/null +++ b/t/t7401-submodule-summary.sh @@ -0,0 +1,195 @@ +#!/bin/sh +# +# Copyright (c) 2008 Ping Yin +# + +test_description='Summary support for submodules + +This test tries to verify the sanity of summary subcommand of git-submodule. +' + +. ./test-lib.sh + +add_file () { + sm=$1 + shift + owd=$(pwd) + cd "$sm" + for name; do + echo "$name" > "$name" && + git add "$name" && + test_tick && + git commit -m "Add $name" + done >/dev/null + git rev-parse --verify HEAD | cut -c1-7 + cd "$owd" +} +commit_file () { + test_tick && + git commit "$@" -m "Commit $*" >/dev/null +} + +test_create_repo sm1 && +add_file . foo + +head1=$(add_file sm1 foo1 foo2) + +test_expect_success 'added submodule' " + git add sm1 && + git submodule summary >actual && + diff actual - <<-EOF +* sm1 0000000...$head1 (2): + > Add foo2 + +EOF +" + +commit_file sm1 && +head2=$(add_file sm1 foo3) + +test_expect_success 'modified submodule(forward)' " + git submodule summary >actual && + diff actual - <<-EOF +* sm1 $head1...$head2 (1): + > Add foo3 + +EOF +" + +commit_file sm1 && +cd sm1 && +git reset --hard HEAD~2 >/dev/null && +head3=$(git rev-parse --verify HEAD | cut -c1-7) && +cd .. + +test_expect_success 'modified submodule(backward)' " + git submodule summary >actual && + diff actual - <<-EOF +* sm1 $head2...$head3 (2): + < Add foo3 + < Add foo2 + +EOF +" + +head4=$(add_file sm1 foo4 foo5) && +head4_full=$(GIT_DIR=sm1/.git git rev-parse --verify HEAD) +test_expect_success 'modified submodule(backward and forward)' " + git submodule summary >actual && + diff actual - <<-EOF +* sm1 $head2...$head4 (4): + > Add foo5 + > Add foo4 + < Add foo3 + < Add foo2 + +EOF +" + +test_expect_success '--summary-limit' " + git submodule summary -n 3 >actual && + diff actual - <<-EOF +* sm1 $head2...$head4 (4): + > Add foo5 + > Add foo4 + < Add foo3 + +EOF +" + +commit_file sm1 && +mv sm1 sm1-bak && +echo sm1 >sm1 && +head5=$(git hash-object sm1 | cut -c1-7) && +git add sm1 && +rm -f sm1 && +mv sm1-bak sm1 + +test_expect_success 'typechanged submodule(submodule->blob), --cached' " + git submodule summary --cached >actual && + diff actual - <<-EOF +* sm1 $head4(submodule)->$head5(blob) (3): + < Add foo5 + +EOF +" + +rm -rf sm1 && +git checkout-index sm1 +test_expect_success 'typechanged submodule(submodule->blob)' " + git submodule summary >actual && + diff actual - <<-EOF +* sm1 $head4(submodule)->$head5(blob): + +EOF +" + +rm -f sm1 && +test_create_repo sm1 && +head6=$(add_file sm1 foo6 foo7) +test_expect_success 'nonexistent commit' " + git submodule summary >actual && + diff actual - <<-EOF +* sm1 $head4...$head6: + Warn: sm1 doesn't contain commit $head4_full + +EOF +" + +commit_file +test_expect_success 'typechanged submodule(blob->submodule)' " + git submodule summary >actual && + diff actual - <<-EOF +* sm1 $head5(blob)->$head6(submodule) (2): + > Add foo7 + +EOF +" + +commit_file sm1 && +rm -rf sm1 +test_expect_success 'deleted submodule' " + git submodule summary >actual && + diff actual - <<-EOF +* sm1 $head6...0000000: + +EOF +" + +test_create_repo sm2 && +head7=$(add_file sm2 foo8 foo9) && +git add sm2 + +test_expect_success 'multiple submodules' " + git submodule summary >actual && + diff actual - <<-EOF +* sm1 $head6...0000000: + +* sm2 0000000...$head7 (2): + > Add foo9 + +EOF +" + +test_expect_success 'path filter' " + git submodule summary sm2 >actual && + diff actual - <<-EOF +* sm2 0000000...$head7 (2): + > Add foo9 + +EOF +" + +commit_file sm2 +test_expect_success 'given commit' " + git submodule summary HEAD^ >actual && + diff actual - <<-EOF +* sm1 $head6...0000000: + +* sm2 0000000...$head7 (2): + > Add foo9 + +EOF +" + +test_done diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh index 361886c3d6..c0288f345f 100755 --- a/t/t7501-commit.sh +++ b/t/t7501-commit.sh @@ -203,7 +203,7 @@ test_expect_success 'sign off (1)' ' git var GIT_COMMITTER_IDENT | sed -e "s/>.*/>/" -e "s/^/Signed-off-by: /" ) >expected && - diff -u expected actual + test_cmp expected actual ' @@ -223,7 +223,7 @@ $existing" && git var GIT_COMMITTER_IDENT | sed -e "s/>.*/>/" -e "s/^/Signed-off-by: /" ) >expected && - diff -u expected actual + test_cmp expected actual ' @@ -240,7 +240,7 @@ test_expect_success 'multiple -m' ' echo echo three ) >expected && - diff -u expected actual + test_cmp expected actual ' @@ -301,12 +301,12 @@ test_expect_success 'same tree (merge and amend merge)' ' git merge -s ours side -m "empty ok" && git diff HEAD^ HEAD >actual && : >expected && - diff -u expected actual && + test_cmp expected actual && git commit --amend -m "empty really ok" && git diff HEAD^ HEAD >actual && : >expected && - diff -u expected actual + test_cmp expected actual ' @@ -323,7 +323,7 @@ test_expect_success 'amend using the message from another commit' ' git commit --allow-empty --amend -C "$old" && git show --pretty="format:%ad %s" "$old" >expected && git show --pretty="format:%ad %s" HEAD >actual && - diff -u expected actual + test_cmp expected actual ' @@ -341,7 +341,7 @@ test_expect_success 'amend using the message from a commit named with tag' ' git commit --allow-empty --amend -C tagged-old && git show --pretty="format:%ad %s" "$old" >expected && git show --pretty="format:%ad %s" HEAD >actual && - diff -u expected actual + test_cmp expected actual ' diff --git a/t/t7502-commit.sh b/t/t7502-commit.sh index b780fddc08..284c941247 100755 --- a/t/t7502-commit.sh +++ b/t/t7502-commit.sh @@ -85,7 +85,7 @@ test_expect_success 'verbose' ' git add negative && git status -v | sed -ne "/^diff --git /p" >actual && echo "diff --git a/negative b/negative" >expect && - diff -u expect actual + test_cmp expect actual ' @@ -95,7 +95,7 @@ test_expect_success 'cleanup commit messages (verbatim,-t)' ' { echo;echo "# text";echo; } >expect && git commit --cleanup=verbatim -t expect -a && git cat-file -p HEAD |sed -e "1,/^\$/d" |head -n 3 >actual && - diff -u expect actual + test_cmp expect actual ' @@ -104,7 +104,7 @@ test_expect_success 'cleanup commit messages (verbatim,-F)' ' echo >>negative && git commit --cleanup=verbatim -F expect -a && git cat-file -p HEAD |sed -e "1,/^\$/d">actual && - diff -u expect actual + test_cmp expect actual ' @@ -113,7 +113,7 @@ test_expect_success 'cleanup commit messages (verbatim,-m)' ' echo >>negative && git commit --cleanup=verbatim -m "$(cat expect)" -a && git cat-file -p HEAD |sed -e "1,/^\$/d">actual && - diff -u expect actual + test_cmp expect actual ' @@ -124,7 +124,7 @@ test_expect_success 'cleanup commit messages (whitespace,-F)' ' echo "# text" >expect && git commit --cleanup=whitespace -F text -a && git cat-file -p HEAD |sed -e "1,/^\$/d">actual && - diff -u expect actual + test_cmp expect actual ' @@ -135,7 +135,7 @@ test_expect_success 'cleanup commit messages (strip,-F)' ' echo sample >expect && git commit --cleanup=strip -F text -a && git cat-file -p HEAD |sed -e "1,/^\$/d">actual && - diff -u expect actual + test_cmp expect actual ' @@ -150,7 +150,7 @@ test_expect_success 'cleanup commit messages (strip,-F,-e)' ' { echo;echo sample;echo; } >text && git commit -e -F text -a && head -n 4 .git/COMMIT_EDITMSG >actual && - diff -u expect actual + test_cmp expect actual ' diff --git a/t/t7502-status.sh b/t/t7502-status.sh index e00607490b..cd08516e6d 100755 --- a/t/t7502-status.sh +++ b/t/t7502-status.sh @@ -33,7 +33,7 @@ test_expect_success 'setup' ' test_expect_success 'status (1)' ' - grep -e "use \"git rm --cached <file>\.\.\.\" to unstage" output + grep "use \"git rm --cached <file>\.\.\.\" to unstage" output ' @@ -146,7 +146,7 @@ cat <<EOF >expect EOF test_expect_success 'status of partial commit excluding new file in index' ' git status dir1/modified >output && - diff -u expect output + test_cmp expect output ' test_done diff --git a/t/t7505-prepare-commit-msg-hook.sh b/t/t7505-prepare-commit-msg-hook.sh index 7ddec99a64..802aa624d0 100755 --- a/t/t7505-prepare-commit-msg-hook.sh +++ b/t/t7505-prepare-commit-msg-hook.sh @@ -25,8 +25,9 @@ export FAKE_EDITOR HOOKDIR="$(git rev-parse --git-dir)/hooks" HOOK="$HOOKDIR/prepare-commit-msg" mkdir -p "$HOOKDIR" -cat > "$HOOK" <<'EOF' -#!/bin/sh +echo "#!$SHELL_PATH" > "$HOOK" +cat >> "$HOOK" <<'EOF' + if test "$2" = commit; then source=$(git-rev-parse "$3") else diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh index 5d166280cb..56869aceed 100755 --- a/t/t7600-merge.sh +++ b/t/t7600-merge.sh @@ -108,7 +108,7 @@ create_merge_msgs() { } verify_diff() { - if ! diff -u "$1" "$2" + if ! test_cmp "$1" "$2" then echo "$3" false @@ -165,7 +165,7 @@ verify_mergeheads() { fi && while test $# -gt 0 do - head=$(head -n $i .git/MERGE_HEAD | tail -n 1) + head=$(head -n $i .git/MERGE_HEAD | sed -ne \$p) if test "$1" != "$head" then echo "[OOPS] MERGE_HEAD $i != $1" @@ -371,7 +371,7 @@ test_expect_success 'override config option -n' ' git merge --summary c2 >diffstat.txt && verify_merge file result.1-5 msg.1-5 && verify_parents $c1 $c2 && - if ! grep -e "^ file | *2 +-$" diffstat.txt + if ! grep "^ file | *2 +-$" diffstat.txt then echo "[OOPS] diffstat was not generated" fi @@ -386,7 +386,7 @@ test_expect_success 'override config option --summary' ' git merge -n c2 >diffstat.txt && verify_merge file result.1-5 msg.1-5 && verify_parents $c1 $c2 && - if grep -e "^ file | *2 +-$" diffstat.txt + if grep "^ file | *2 +-$" diffstat.txt then echo "[OOPS] diffstat was generated" false diff --git a/t/t8003-blame.sh b/t/t8003-blame.sh index db51b3a6bb..966bb0a61a 100755 --- a/t/t8003-blame.sh +++ b/t/t8003-blame.sh @@ -112,7 +112,7 @@ test_expect_success 'blame wholesale copy' ' echo mouse-Second echo mouse-Third } >expected && - diff -u expected current + test_cmp expected current ' @@ -125,7 +125,7 @@ test_expect_success 'blame wholesale copy and more' ' echo cow-Fifth echo mouse-Third } >expected && - diff -u expected current + test_cmp expected current ' diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh index cbbfa9cb49..c0973b4e6e 100755 --- a/t/t9001-send-email.sh +++ b/t/t9001-send-email.sh @@ -81,7 +81,7 @@ test_expect_success 'Show all headers' ' -e "s/^\(Message-Id:\).*/\1 MESSAGE-ID-STRING/" \ -e "s/^\(X-Mailer:\).*/\1 X-MAILER-STRING/" \ >actual-show-all-headers && - diff -u expected-show-all-headers actual-show-all-headers + test_cmp expected-show-all-headers actual-show-all-headers ' z8=zzzzzzzz diff --git a/t/t9112-git-svn-md5less-file.sh b/t/t9112-git-svn-md5less-file.sh index 08313bb545..646a5f0cdb 100755 --- a/t/t9112-git-svn-md5less-file.sh +++ b/t/t9112-git-svn-md5less-file.sh @@ -1,3 +1,5 @@ +#!/bin/sh + test_description='test that git handles an svn repository with missing md5sums' . ./lib-git-svn.sh diff --git a/t/t9116-git-svn-log.sh b/t/t9116-git-svn-log.sh index 902ed4145d..e1e8bdf0e3 100755 --- a/t/t9116-git-svn-log.sh +++ b/t/t9116-git-svn-log.sh @@ -55,74 +55,74 @@ printf 'r1 \nr2 \nr4 \n' > expected-range-r1-r2-r4 test_expect_success 'test ascending revision range' " git reset --hard trunk && - git svn log -r 1:4 | grep '^r[0-9]' | cut -d'|' -f1 | diff -u expected-range-r1-r2-r4 - + git svn log -r 1:4 | grep '^r[0-9]' | cut -d'|' -f1 | test_cmp expected-range-r1-r2-r4 - " printf 'r4 \nr2 \nr1 \n' > expected-range-r4-r2-r1 test_expect_success 'test descending revision range' " git reset --hard trunk && - git svn log -r 4:1 | grep '^r[0-9]' | cut -d'|' -f1 | diff -u expected-range-r4-r2-r1 - + git svn log -r 4:1 | grep '^r[0-9]' | cut -d'|' -f1 | test_cmp expected-range-r4-r2-r1 - " printf 'r1 \nr2 \n' > expected-range-r1-r2 test_expect_success 'test ascending revision range with unreachable revision' " git reset --hard trunk && - git svn log -r 1:3 | grep '^r[0-9]' | cut -d'|' -f1 | diff -u expected-range-r1-r2 - + git svn log -r 1:3 | grep '^r[0-9]' | cut -d'|' -f1 | test_cmp expected-range-r1-r2 - " printf 'r2 \nr1 \n' > expected-range-r2-r1 test_expect_success 'test descending revision range with unreachable revision' " git reset --hard trunk && - git svn log -r 3:1 | grep '^r[0-9]' | cut -d'|' -f1 | diff -u expected-range-r2-r1 - + git svn log -r 3:1 | grep '^r[0-9]' | cut -d'|' -f1 | test_cmp expected-range-r2-r1 - " printf 'r2 \n' > expected-range-r2 test_expect_success 'test ascending revision range with unreachable upper boundary revision and 1 commit' " git reset --hard trunk && - git svn log -r 2:3 | grep '^r[0-9]' | cut -d'|' -f1 | diff -u expected-range-r2 - + git svn log -r 2:3 | grep '^r[0-9]' | cut -d'|' -f1 | test_cmp expected-range-r2 - " test_expect_success 'test descending revision range with unreachable upper boundary revision and 1 commit' " git reset --hard trunk && - git svn log -r 3:2 | grep '^r[0-9]' | cut -d'|' -f1 | diff -u expected-range-r2 - + git svn log -r 3:2 | grep '^r[0-9]' | cut -d'|' -f1 | test_cmp expected-range-r2 - " printf 'r4 \n' > expected-range-r4 test_expect_success 'test ascending revision range with unreachable lower boundary revision and 1 commit' " git reset --hard trunk && - git svn log -r 3:4 | grep '^r[0-9]' | cut -d'|' -f1 | diff -u expected-range-r4 - + git svn log -r 3:4 | grep '^r[0-9]' | cut -d'|' -f1 | test_cmp expected-range-r4 - " test_expect_success 'test descending revision range with unreachable lower boundary revision and 1 commit' " git reset --hard trunk && - git svn log -r 4:3 | grep '^r[0-9]' | cut -d'|' -f1 | diff -u expected-range-r4 - + git svn log -r 4:3 | grep '^r[0-9]' | cut -d'|' -f1 | test_cmp expected-range-r4 - " printf -- '------------------------------------------------------------------------\n' > expected-separator test_expect_success 'test ascending revision range with unreachable boundary revisions and no commits' " git reset --hard trunk && - git svn log -r 5:6 | diff -u expected-separator - + git svn log -r 5:6 | test_cmp expected-separator - " test_expect_success 'test descending revision range with unreachable boundary revisions and no commits' " git reset --hard trunk && - git svn log -r 6:5 | diff -u expected-separator - + git svn log -r 6:5 | test_cmp expected-separator - " test_expect_success 'test ascending revision range with unreachable boundary revisions and 1 commit' " git reset --hard trunk && - git svn log -r 3:5 | grep '^r[0-9]' | cut -d'|' -f1 | diff -u expected-range-r4 - + git svn log -r 3:5 | grep '^r[0-9]' | cut -d'|' -f1 | test_cmp expected-range-r4 - " test_expect_success 'test descending revision range with unreachable boundary revisions and 1 commit' " git reset --hard trunk && - git svn log -r 5:3 | grep '^r[0-9]' | cut -d'|' -f1 | diff -u expected-range-r4 - + git svn log -r 5:3 | grep '^r[0-9]' | cut -d'|' -f1 | test_cmp expected-range-r4 - " test_done diff --git a/t/t9120-git-svn-clone-with-percent-escapes.sh b/t/t9120-git-svn-clone-with-percent-escapes.sh new file mode 100755 index 0000000000..9a4eabe523 --- /dev/null +++ b/t/t9120-git-svn-clone-with-percent-escapes.sh @@ -0,0 +1,31 @@ +#!/bin/sh +# +# Copyright (c) 2008 Kevin Ballard +# + +test_description='git-svn clone with percent escapes' +. ./lib-git-svn.sh + +test_expect_success 'setup svnrepo' " + mkdir project project/trunk project/branches project/tags && + echo foo > project/trunk/foo && + svn import -m '$test_description' project '$svnrepo/pr ject' && + rm -rf project && + start_httpd +" + +if test "$SVN_HTTPD_PORT" = "" +then + test_expect_failure 'test clone with percent escapes - needs SVN_HTTPD_PORT set' 'false' +else + test_expect_success 'test clone with percent escapes' ' + git svn clone "$svnrepo/pr%20ject" clone && + cd clone && + git rev-parse refs/remotes/git-svn && + cd .. + ' +fi + +stop_httpd + +test_done diff --git a/t/t9121-git-svn-fetch-renamed-dir.sh b/t/t9121-git-svn-fetch-renamed-dir.sh new file mode 100755 index 0000000000..5143ed6066 --- /dev/null +++ b/t/t9121-git-svn-fetch-renamed-dir.sh @@ -0,0 +1,20 @@ +#!/bin/sh +# +# Copyright (c) 2008 Santhosh Kumar Mani + + +test_description='git-svn can fetch renamed directories' + +. ./lib-git-svn.sh + +test_expect_success 'load repository with renamed directory' " + svnadmin load -q $rawsvnrepo < ../t9121/renamed-dir.dump + " + +test_expect_success 'init and fetch repository' " + git svn init $svnrepo/newname && + git svn fetch + " + +test_done + diff --git a/t/t9121/renamed-dir.dump b/t/t9121/renamed-dir.dump new file mode 100644 index 0000000000..5f9127be92 --- /dev/null +++ b/t/t9121/renamed-dir.dump @@ -0,0 +1,90 @@ +SVN-fs-dump-format-version: 2 + +UUID: 06b9b3ad-f546-4fbe-8328-fcb4e6ef5c3f + +Revision-number: 0 +Prop-content-length: 56 +Content-length: 56 + +K 8 +svn:date +V 27 +2008-04-02T09:11:59.778557Z +PROPS-END + +Revision-number: 1 +Prop-content-length: 117 +Content-length: 117 + +K 7 +svn:log +V 14 +initial import +K 10 +svn:author +V 8 +santhosh +K 8 +svn:date +V 27 +2008-04-02T09:13:03.170863Z +PROPS-END + +Node-path: name +Node-kind: dir +Node-action: add +Prop-content-length: 10 +Content-length: 10 + +PROPS-END + + +Node-path: name/a.txt +Node-kind: file +Node-action: add +Prop-content-length: 71 +Text-content-length: 6 +Text-content-md5: b1946ac92492d2347c6235b4d2611184 +Content-length: 77 + +K 13 +svn:mime-type +V 10 +text/plain +K 13 +svn:eol-style +V 2 +LF +PROPS-END +hello + + +Revision-number: 2 +Prop-content-length: 109 +Content-length: 109 + +K 7 +svn:log +V 7 +renamed +K 10 +svn:author +V 8 +santhosh +K 8 +svn:date +V 27 +2008-04-02T09:14:22.952186Z +PROPS-END + +Node-path: newname +Node-kind: dir +Node-action: add +Node-copyfrom-rev: 1 +Node-copyfrom-path: name + + +Node-path: name +Node-action: delete + + diff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh index 58c59ed5ae..42b144b1b3 100755 --- a/t/t9200-git-cvsexportcommit.sh +++ b/t/t9200-git-cvsexportcommit.sh @@ -37,7 +37,7 @@ check_entries () { else printf '%s\n' "$2" | tr '|' '\012' >expected fi - diff -u expected actual + test_cmp expected actual } test_expect_success \ @@ -257,8 +257,8 @@ test_expect_success '-w option should work with relative GIT_DIR' ' (cd "$GIT_DIR" && GIT_DIR=. git cvsexportcommit -w "$CVSWORK" -c $id && check_entries "$CVSWORK/W" "file1.txt/1.1/|file2.txt/1.1/" && - diff -u "$CVSWORK/W/file1.txt" ../W/file1.txt && - diff -u "$CVSWORK/W/file2.txt" ../W/file2.txt + test_cmp "$CVSWORK/W/file1.txt" ../W/file1.txt && + test_cmp "$CVSWORK/W/file2.txt" ../W/file2.txt ) ' @@ -279,9 +279,9 @@ test_expect_success 'check files before directories' ' git cvsexportcommit -w "$CVSWORK" -c $id && check_entries "$CVSWORK/E" "DS/1.1/|newfile5.txt/1.1/" && check_entries "$CVSWORK" "DS/1.1/|release-notes/1.2/" && - diff -u "$CVSWORK/DS" DS && - diff -u "$CVSWORK/E/DS" E/DS && - diff -u "$CVSWORK/release-notes" release-notes + test_cmp "$CVSWORK/DS" DS && + test_cmp "$CVSWORK/E/DS" E/DS && + test_cmp "$CVSWORK/release-notes" release-notes ' @@ -293,7 +293,7 @@ test_expect_success 'commit a file with leading spaces in the name' ' id=$(git rev-parse HEAD) && git cvsexportcommit -w "$CVSWORK" -c $id && check_entries "$CVSWORK" " space/1.1/|DS/1.1/|release-notes/1.2/" && - diff -u "$CVSWORK/ space" " space" + test_cmp "$CVSWORK/ space" " space" ' diff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh index 0a20971ebb..166b43f783 100755 --- a/t/t9400-git-cvsserver-server.sh +++ b/t/t9400-git-cvsserver-server.sh @@ -54,7 +54,7 @@ test_expect_success 'setup' ' test_expect_success 'basic checkout' \ 'GIT_CONFIG="$git_config" cvs -Q co -d cvswork master && test "$(echo $(grep -v ^D cvswork/CVS/Entries|cut -d/ -f2,3,5 | head -n 1))" = "empty/1.1/" - test "$(echo $(grep -v ^D cvswork/CVS/Entries|cut -d/ -f2,3,5 | tail -n 1))" = "secondrootfile/1.1/"' + test "$(echo $(grep -v ^D cvswork/CVS/Entries|cut -d/ -f2,3,5 | sed -ne \$p))" = "secondrootfile/1.1/"' #------------------------ # PSERVER AUTHENTICATION @@ -94,7 +94,7 @@ EOF test_expect_success 'pserver authentication' \ 'cat request-anonymous | git-cvsserver pserver >log 2>&1 && - tail -n1 log | grep -q "^I LOVE YOU$"' + sed -ne \$p log | grep "^I LOVE YOU$"' test_expect_success 'pserver authentication failure (non-anonymous user)' \ 'if cat request-git | git-cvsserver pserver >log 2>&1 @@ -103,11 +103,11 @@ test_expect_success 'pserver authentication failure (non-anonymous user)' \ else true fi && - tail -n1 log | grep -q "^I HATE YOU$"' + sed -ne \$p log | grep "^I HATE YOU$"' test_expect_success 'pserver authentication (login)' \ 'cat login-anonymous | git-cvsserver pserver >log 2>&1 && - tail -n1 log | grep -q "^I LOVE YOU$"' + sed -ne \$p log | grep "^I LOVE YOU$"' test_expect_success 'pserver authentication failure (login/non-anonymous user)' \ 'if cat login-git | git-cvsserver pserver >log 2>&1 @@ -116,7 +116,7 @@ test_expect_success 'pserver authentication failure (login/non-anonymous user)' else true fi && - tail -n1 log | grep -q "^I HATE YOU$"' + sed -ne \$p log | grep "^I HATE YOU$"' # misuse pserver authentication for testing of req_Root @@ -146,15 +146,15 @@ test_expect_success 'req_Root failure (relative pathname)' \ else true fi && - tail log | grep -q "^error 1 Root must be an absolute pathname$"' + tail log | grep "^error 1 Root must be an absolute pathname$"' test_expect_success 'req_Root failure (conflicting roots)' \ 'cat request-conflict | git-cvsserver pserver >log 2>&1 && - tail log | grep -q "^error 1 Conflicting roots specified$"' + tail log | grep "^error 1 Conflicting roots specified$"' test_expect_success 'req_Root (strict paths)' \ 'cat request-anonymous | git-cvsserver --strict-paths pserver $SERVERDIR >log 2>&1 && - tail -n1 log | grep -q "^I LOVE YOU$"' + sed -ne \$p log | grep "^I LOVE YOU$"' test_expect_success 'req_Root failure (strict-paths)' ' ! cat request-anonymous | @@ -163,7 +163,7 @@ test_expect_success 'req_Root failure (strict-paths)' ' test_expect_success 'req_Root (w/o strict-paths)' \ 'cat request-anonymous | git-cvsserver pserver $WORKDIR/ >log 2>&1 && - tail -n1 log | grep -q "^I LOVE YOU$"' + sed -ne \$p log | grep "^I LOVE YOU$"' test_expect_success 'req_Root failure (w/o strict-paths)' ' ! cat request-anonymous | @@ -181,7 +181,7 @@ EOF test_expect_success 'req_Root (base-path)' \ 'cat request-base | git-cvsserver --strict-paths --base-path $WORKDIR/ pserver $SERVERDIR >log 2>&1 && - tail -n1 log | grep -q "^I LOVE YOU$"' + sed -ne \$p log | grep "^I LOVE YOU$"' test_expect_success 'req_Root failure (base-path)' ' ! cat request-anonymous | @@ -192,14 +192,14 @@ GIT_DIR="$SERVERDIR" git config --bool gitcvs.enabled false || exit 1 test_expect_success 'req_Root (export-all)' \ 'cat request-anonymous | git-cvsserver --export-all pserver $WORKDIR >log 2>&1 && - tail -n1 log | grep -q "^I LOVE YOU$"' + sed -ne \$p log | grep "^I LOVE YOU$"' test_expect_success 'req_Root failure (export-all w/o whitelist)' \ '! (cat request-anonymous | git-cvsserver --export-all pserver >log 2>&1 || false)' test_expect_success 'req_Root (everything together)' \ 'cat request-base | git-cvsserver --export-all --strict-paths --base-path $WORKDIR/ pserver $SERVERDIR >log 2>&1 && - tail -n1 log | grep -q "^I LOVE YOU$"' + sed -ne \$p log | grep "^I LOVE YOU$"' GIT_DIR="$SERVERDIR" git config --bool gitcvs.enabled true || exit 1 @@ -216,7 +216,7 @@ test_expect_success 'gitcvs.enabled = false' \ else true fi && - cat cvs.log | grep -q "GITCVS emulation disabled" && + grep "GITCVS emulation disabled" cvs.log && test ! -d cvswork2' rm -fr cvswork2 @@ -237,7 +237,7 @@ test_expect_success 'gitcvs.ext.enabled = false' \ else true fi && - cat cvs.log | grep -q "GITCVS emulation disabled" && + grep "GITCVS emulation disabled" cvs.log && test ! -d cvswork2' rm -fr cvswork2 @@ -420,4 +420,54 @@ test_expect_success 'cvs update (merge no-op)' \ GIT_CONFIG="$git_config" cvs -Q update && diff -q merge ../merge' +cd "$WORKDIR" +test_expect_success 'cvs update (-p)' ' + touch really-empty && + echo Line 1 > no-lf && + echo -n Line 2 >> no-lf && + git add really-empty no-lf && + git commit -q -m "Update -p test" && + git push gitcvs.git >/dev/null && + cd cvswork && + GIT_CONFIG="$git_config" cvs update && + rm -f failures && + for i in merge no-lf empty really-empty; do + GIT_CONFIG="$git_config" cvs update -p "$i" >$i.out + diff $i.out ../$i >>failures 2>&1 + done && + test -z "$(cat failures)" +' + +#------------ +# CVS STATUS +#------------ + +cd "$WORKDIR" +test_expect_success 'cvs status' ' + mkdir status.dir && + echo Line > status.dir/status.file && + echo Line > status.file && + git add status.dir status.file && + git commit -q -m "Status test" && + git push gitcvs.git >/dev/null && + cd cvswork && + GIT_CONFIG="$git_config" cvs update && + GIT_CONFIG="$git_config" cvs status | grep "^File: status.file" >../out && + test $(wc -l <../out) = 2 +' + +cd "$WORKDIR" +test_expect_success 'cvs status (nonrecursive)' ' + cd cvswork && + GIT_CONFIG="$git_config" cvs status -l | grep "^File: status.file" >../out && + test $(wc -l <../out) = 1 +' + +cd "$WORKDIR" +test_expect_success 'cvs status (no subdirs in header)' ' + cd cvswork && + GIT_CONFIG="$git_config" cvs status | grep ^File: >../out && + ! grep / <../out +' + test_done diff --git a/t/t9600-cvsimport.sh b/t/t9600-cvsimport.sh index 7706430d81..00a74ee738 100755 --- a/t/t9600-cvsimport.sh +++ b/t/t9600-cvsimport.sh @@ -3,6 +3,12 @@ test_description='git-cvsimport basic tests' . ./test-lib.sh +CVSROOT=$(pwd)/cvsroot +export CVSROOT +# for clean cvsps cache +HOME=$(pwd) +export HOME + if ! type cvs >/dev/null 2>&1 then say 'skipping cvsimport tests, cvs not found' @@ -26,12 +32,6 @@ case "$cvsps_version" in ;; esac -CVSROOT=$(pwd)/cvsroot -export CVSROOT -# for clean cvsps cache -HOME=$(pwd) -export HOME - test_expect_success 'setup cvsroot' 'cvs init' test_expect_success 'setup a cvs module' ' diff --git a/t/test-lib.sh b/t/test-lib.sh index 6aea0ea0a5..7c2a8ba77d 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -42,6 +42,7 @@ export GIT_MERGE_VERBOSITY export GIT_AUTHOR_EMAIL GIT_AUTHOR_NAME export GIT_COMMITTER_EMAIL GIT_COMMITTER_NAME export EDITOR VISUAL +GIT_TEST_CMP=${GIT_TEST_CMP:-diff -u} # Protect ourselves from common misconfiguration to export # CDPATH into the environment @@ -299,7 +300,24 @@ test_expect_code () { test_must_fail () { "$@" - test $? -gt 0 -a $? -le 128 + test $? -gt 0 -a $? -le 129 +} + +# test_cmp is a helper function to compare actual and expected output. +# You can use it like: +# +# test_expect_success 'foo works' ' +# echo expected >expected && +# foo >actual && +# test_cmp expected actual +# ' +# +# This could be written as either "cmp" or "diff -u", but: +# - cmp's output is not nearly as easy to read as diff -u +# - not all diff versions understand "-u" + +test_cmp() { + $GIT_TEST_CMP "$@" } # Most tests can use the created repository, but some may need to create more. @@ -378,7 +396,12 @@ fi # Test repository test=trash -rm -fr "$test" +rm -fr "$test" || { + trap - exit + echo >&5 "FATAL: Cannot prepare test area" + exit 1 +} + test_create_repo $test cd "$test" |