No subject


Thu Jun 12 23:09:36 BST 2008


Branch my1 set up to track remote branch refs/remotes/local/master.
*   ok 17: test tracking setup via --track

* expecting success: git config remote.local.url . &&
     git config remote.local.fetch refs/heads/master:refs/remotes/local/master &&
     (git show-ref -q refs/remotes/local/master || git-fetch local) &&
     git branch --track my4 local/master &&
     test $(git config branch.my4.remote) = local &&
     test $(git config branch.my4.merge) = refs/heads/master
Branch my4 set up to track remote branch refs/remotes/local/master.
*   ok 18: test tracking setup (non-wildcard, matching)

* expecting success: git config remote.local.url . &&
     git config remote.local.fetch refs/heads/s:refs/remotes/local/s &&
     (git show-ref -q refs/remotes/local/master || git-fetch local) &&
     git branch --track my5 local/master &&
     ! test "$(git config branch.my5.remote)" = local &&
     ! test "$(git config branch.my5.merge)" = refs/heads/master
*   ok 19: test tracking setup (non-wildcard, not matching)

* expecting success: git config branch.autosetupmerge true &&
     git config remote.local.url . &&
     git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
     (git show-ref -q refs/remotes/local/master || git-fetch local) &&
     git branch my3 local/master &&
     test $(git config branch.my3.remote) = local &&
     test $(git config branch.my3.merge) = refs/heads/master
Branch my3 set up to track remote branch refs/remotes/local/master.
*   ok 20: test tracking setup via config

* expecting success: 
	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)"

*   ok 21: avoid ambiguous track

* expecting success: git config branch.autosetupmerge true &&
     git config remote.local.url . &&
     git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
     (git show-ref -q refs/remotes/local/master || git-fetch local) &&
     git branch --no-track my2 local/master &&
     git config branch.autosetupmerge false &&
     ! test "$(git config branch.my2.remote)" = local &&
     ! test "$(git config branch.my2.merge)" = refs/heads/master
*   ok 22: test overriding tracking setup via --no-track

* expecting success: git branch --track my6 s &&
     test -z "$(git config branch.my6.remote)" &&
     test -z "$(git config branch.my6.merge)"
*   ok 23: no tracking without .fetch entries

* expecting success: git config remote.local.url . &&
     git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
     (git show-ref -q refs/remotes/local/o/o || git-fetch local) &&
     git branch --track my7 local/o/o &&
     test "$(git config branch.my7.remote)" = local &&
     test "$(git config branch.my7.merge)" = refs/heads/o/o
Branch my7 set up to track remote branch refs/remotes/local/o/o.
*   ok 24: test tracking setup via --track but deeper

* expecting success: git branch -d my7 &&
     test -z "$(git config branch.my7.remote)" &&
     test -z "$(git config branch.my7.merge)"
Deleted branch my7.
*   ok 25: test deleting branch deletes branch config

* expecting success: git branch my7 s &&
     test "$(git branch -d my7 2>&1)" = "Deleted branch my7."
*   ok 26: test deleting branch without config

* expecting success: GIT_COMMITTER_DATE="2005-05-26 23:30" \
     git-checkout -b g/h/i -l master &&
	 test -f .git/refs/heads/g/h/i &&
	 test -f .git/logs/refs/heads/g/h/i &&
	 diff expect .git/logs/refs/heads/g/h/i
Switched to a new branch "g/h/i"
*   ok 27: git checkout -b g/h/i -l should create a branch and a log

* passed all 27 test(s)
*** t3201-branch-contains.sh ***
* expecting success: 

	>file &&
	git add file &&
	test_tick &&
	git commit -m initial &&
	git branch side &&

	echo 1 >file &&
	test_tick &&
	git commit -a -m "second on master" &&

	git checkout side &&
	echo 1 >file &&
	test_tick &&
	git commit -a -m "second on side" &&

	git merge master


Created initial commit 1bd44cb: initial
 0 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 file
Created commit c77a0a9: second on master
 1 files changed, 1 insertions(+), 0 deletions(-)
Switched to branch "side"
Created commit 5a0fd8a: second on side
 1 files changed, 1 insertions(+), 0 deletions(-)
Merging HEAD with master
Merging:
5a0fd8a second on side
c77a0a9 second on master
found 1 common ancestor(s):
1bd44cb initial
Merge made by recursive.
*   ok 1: setup

* expecting success: 

	git branch --contains=master >actual &&
	{
		echo "  master" && echo "* side"
	} >expect &&
	diff -u expect actual


*   ok 2: branch --contains=master

* expecting success: 

	git branch --contains master >actual &&
	{
		echo "  master" && echo "* side"
	} >expect &&
	diff -u expect actual


*   ok 3: branch --contains master

* expecting success: 

	git branch --contains=side >actual &&
	{
		echo "* side"
	} >expect &&
	diff -u expect actual


*   ok 4: branch --contains=side

* passed all 4 test(s)
*** t3210-pack-refs.sh ***
* expecting success: echo Hello > A &&
     git update-index --add A &&
     git-commit -m "Initial commit." &&
     HEAD=$(git rev-parse --verify HEAD)
Created initial commit b5ecd4b: Initial commit.
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 A
*   ok 1: prepare a trivial repository

* expecting success: git branch a &&
     SHA1=`cat .git/refs/heads/a` &&
     echo "$SHA1 refs/heads/a" >expect &&
     git show-ref a >result &&
     diff expect result
*   ok 2: see if git show-ref works as expected

* expecting success: git branch b &&
     git pack-refs --all &&
     rm -f .git/refs/heads/b &&
     echo "$SHA1 refs/heads/b" >expect &&
     git show-ref b >result &&
     diff expect result
*   ok 3: see if a branch still exists when packed

* expecting failure: git branch c &&
     git pack-refs --all &&
     rm .git/refs/heads/c &&
     git branch c/d
rm: cannot remove `.git/refs/heads/c': No such file or directory
*   ok 4: git branch c/d should barf if branch c exists

* expecting success: git branch e &&
     git pack-refs --all --prune &&
     echo "$SHA1 refs/heads/e" >expect &&
     git show-ref e >result &&
     diff expect result
*   ok 5: see if a branch still exists after git pack-refs --prune

* expecting failure: git branch f &&
     git pack-refs --all --prune &&
     ls .git/refs/heads/f
ls: cannot access .git/refs/heads/f: No such file or directory
*   ok 6: see if git pack-refs --prune remove ref files

* expecting success: git branch g/h &&
     git pack-refs --all --prune &&
     git branch -d g/h &&
     git branch g &&
     git pack-refs --all &&
     git branch -d g
Deleted branch g/h.
Deleted branch g.
*   ok 7: git branch g should work when git branch g/h has been deleted

* expecting failure: git branch i &&
     git pack-refs --all --prune &&
     git branch i/j/k
error: 'refs/heads/i' exists; cannot create 'refs/heads/i/j/k'
fatal: Failed to lock ref for update: Success.
*   ok 8: git branch i/j/k should barf if branch i exists

* expecting success: git branch k/l &&
     git branch k/lm &&
     git branch -d k/l &&
     git branch k/l/m &&
     git branch -d k/l/m &&
     git branch -d k/lm &&
     git branch k
Deleted branch k/l.
Deleted branch k/l/m.
Deleted branch k/lm.
*   ok 9: test git branch k after branch k/l/m and k/lm have been deleted

* expecting success: git branch n/o &&
     git branch n/op &&
     git branch -d n/o &&
     git branch n/o/p &&
     git branch -d n/op &&
     git pack-refs --all --prune &&
     git branch -d n/o/p &&
     git branch n
Deleted branch n/o.
Deleted branch n/op.
Deleted branch n/o/p.
*   ok 10: test git branch n after some branch deletion and pruning

* expecting success: 
	git-tag foo &&
	git pack-refs --all --prune &&
	git show-ref >all-of-them &&
	git pack-refs &&
	git show-ref >again &&
	diff all-of-them again

*   ok 11: pack, prune and repack

* passed all 11 test(s)
*** t3300-funny-names.sh ***
* expecting success: git update-index --add "$p0" "$p2" &&
	git ls-files >current &&
	git diff expected current
*   ok 1: git ls-files no-funny

* expecting success: git update-index --add "$p1" &&
	git ls-files >current &&
	git diff expected current
*   ok 2: git ls-files with-funny

* expecting success: git ls-files -z | tr \000 \012 >current &&
	git diff expected current
*   ok 3: git ls-files -z with-funny

* expecting success: git ls-tree -r $t1 | sed -e "s/^[^	]*	//" >current &&
	 git diff expected current
*   ok 4: git ls-tree with funny

* expecting success: git diff-index --name-status $t0 >current &&
	git diff expected current
*   ok 5: git diff-index with-funny

* expecting success: git diff-tree --name-status $t0 $t1 >current &&
	git diff expected current
*   ok 6: git diff-tree with-funny

* expecting success: git diff-index -z --name-status $t0 | tr \000 \012 >current &&
	git diff expected current
*   ok 7: git diff-index -z with-funny

* expecting success: git diff-tree -z --name-status $t0 $t1 | tr \000 \012 >current &&
	git diff expected current
*   ok 8: git diff-tree -z with-funny

* expecting success: git diff-tree -C --find-copies-harder --name-status \
		$t0 $t1 | sed -e s/^C[0-9]*/CNUM/ >current &&
	git diff expected current
*   ok 9: git diff-tree -C with-funny

* expecting success: git update-index --force-remove "$p0" &&
	git diff-index -M --name-status \
		$t0 | sed -e s/^R[0-9]*/RNUM/ >current &&
	git diff expected current
*   ok 10: git diff-tree delete with-funny

* expecting success: git diff-index -M -p $t0 |
	 sed -e "s/index [0-9]*%/index NUM%/" >current &&
	 git diff expected current
*   ok 11: git diff-tree delete with-funny

* expecting success: git diff-index -M -p $t0 |
	 sed -e "s/index [0-9]*%/index NUM%/" >current &&
	 git diff expected current
*   ok 12: git diff-tree delete with-funny

* expecting success: git diff-index -M -p $t0 |
	 git apply --stat | sed -e "s/|.*//" -e "s/ *\$//" >current &&
	 git diff expected current
*   ok 13: git diff-tree rename with-funny applied

* expecting success: git diff-index -p $t0 |
	 git apply --stat | sed -e "s/|.*//" -e "s/ *\$//" >current &&
	 git diff expected current
*   ok 14: git diff-tree delete with-funny applied

* expecting success: git diff-index -p $t0 |
	 sed -ne "/^[-+@]/p" |
	 git apply --stat | sed -e "s/|.*//" -e "s/ *\$//" >current &&
	 git diff expected current
*   ok 15: git apply non-git diff

* passed all 15 test(s)
*** t3400-rebase.sh ***
* expecting success: echo First > A &&
     git update-index --add A &&
     git-commit -m "Add A." &&
     git checkout -b my-topic-branch &&
     echo Second > B &&
     git update-index --add B &&
     git-commit -m "Add B." &&
     git checkout -f master &&
     echo Third >> A &&
     git update-index A &&
     git-commit -m "Modify A." &&
     git checkout -b side my-topic-branch &&
     echo Side >> C &&
     git add C &&
     git commit -m "Add C" &&
     git checkout -b nonlinear my-topic-branch &&
     echo Edit >> B &&
     git add B &&
     git commit -m "Modify B" &&
     git merge side &&
     git checkout -b upstream-merged-nonlinear &&
     git merge master &&
     git checkout -f my-topic-branch &&
     git tag topic

Created initial commit 22ecb3a: Add A.
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 A
Switched to a new branch "my-topic-branch"
Created commit fd3e81e: Add B.
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 B
Switched to branch "master"
Created commit 7426546: Modify A.
 1 files changed, 1 insertions(+), 0 deletions(-)
Switched to a new branch "side"
Created commit d2ed636: Add C
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 C
Switched to a new branch "nonlinear"
Created commit 61b6f78: Modify B
 1 files changed, 1 insertions(+), 0 deletions(-)
Merging HEAD with side
Merging:
61b6f78 Modify B
d2ed636 Add C
found 1 common ancestor(s):
fd3e81e Add B.
Merge made by recursive.
 C |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 C
Switched to a new branch "upstream-merged-nonlinear"
Merging HEAD with master
Merging:
95ac435 Merge branch 'side' into nonlinear
7426546 Modify A.
found 1 common ancestor(s):
22ecb3a Add A.
Merge made by recursive.
 A |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Switched to branch "my-topic-branch"
*   ok 1: prepare repository with topic branches

* expecting success: 
     git rebase master
First, rewinding head to replay your work on top of it...
HEAD is now at 7426546... Modify A.
Applying Add B.
*   ok 2: rebase against master

* expecting failure: git log | grep "Author:" | grep "<>"
*   ok 3: the rebase operation should not have destroyed author information

* expecting success: 
     git reset --hard topic &&
     git merge master &&
     git rebase master &&
     ! git show | grep "^Merge:"

HEAD is now at fd3e81e... Add B.
Merging HEAD with master
Merging:
fd3e81e Add B.
7426546 Modify A.
found 1 common ancestor(s):
22ecb3a Add A.
Merge made by recursive.
 A |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
First, rewinding head to replay your work on top of it...
HEAD is now at 7426546... Modify A.
Applying Add B.
*   ok 4: rebase after merge master

* expecting success: 
     git checkout nonlinear &&
     test 4 = $(git rev-list master.. | wc -l) &&
     git rebase master &&
     test 3 = $(git rev-list master.. | wc -l)

Switched to branch "nonlinear"
First, rewinding head to replay your work on top of it...
HEAD is now at 7426546... Modify A.
Applying Add B.
Applying Add C
Applying Modify B
*   ok 5: rebase of history with merges is linearized

* expecting success: 
     git checkout upstream-merged-nonlinear &&
     test 5 = $(git rev-list master.. | wc -l) &&
     git rebase master &&
     test 3 = $(git rev-list master.. | wc -l)

Switched to branch "upstream-merged-nonlinear"
First, rewinding head to replay your work on top of it...
HEAD is now at 7426546... Modify A.
Applying Add B.
Applying Add C
Applying Modify B
*   ok 6: rebase of history with merges after upstream merge is linearized

* expecting success: 
     git checkout master &&
     echo 1 > X &&
     git add X &&
     test_tick &&
     git commit -m prepare &&
     git checkout -b modechange HEAD^ &&
     echo 1 > X &&
     git add X &&
     chmod a+x A &&
     test_tick &&
     git commit -m modechange A X &&
     GIT_TRACE=1 git rebase master

Switched to branch "master"
Created commit 99f23d7: prepare
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 X
Switched to a new branch "modechange"
Created commit 72a1ae6: modechange
 1 files changed, 1 insertions(+), 0 deletions(-)
 mode change 100644 => 100755 A
 create mode 100644 X
trace: exec: 'git-rebase' 'master'
trace: built-in: git 'rev-parse' '--git-dir'
trace: built-in: git 'rev-parse' '--is-inside-work-tree'
trace: built-in: git 'rev-parse' '--show-cdup'
trace: built-in: git 'update-index' '--refresh'
trace: built-in: git 'diff-index' '--cached' '--name-status' '-r' 'HEAD' '--'
trace: built-in: git 'rev-parse' '--verify' 'master^0'
trace: built-in: git 'rev-parse' '--verify' 'master^0'
trace: built-in: git 'symbolic-ref' '-q' 'HEAD'
trace: built-in: git 'rev-parse' '--verify' 'modechange^0'
trace: built-in: git 'merge-base' '99f23d7aa2e080f8cd407e8f5acffec0285e7a1f' '72a1ae66863bcb860c4d7835ac47c4fd35b8a46f'
trace: built-in: git 'rev-parse' 'HEAD^0'
First, rewinding head to replay your work on top of it...
trace: built-in: git 'reset' '--hard' '99f23d7aa2e080f8cd407e8f5acffec0285e7a1f'
trace: exec: 'git-read-tree' '-v' '--reset' '-u' '99f23d7aa2e080f8cd407e8f5acffec0285e7a1f'
trace: built-in: git 'read-tree' '-v' '--reset' '-u' '99f23d7aa2e080f8cd407e8f5acffec0285e7a1f'
HEAD is now at 99f23d7... prepare
trace: built-in: git 'format-patch' '-k' '--stdout' '--full-index' '--ignore-if-in-upstream' '99f23d7aa2e080f8cd407e8f5acffec0285e7a1f..ORIG_HEAD'
trace: exec: 'git-am' '--binary' '-3' '-k' '--resolvemsg=
When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To restore the original branch and stop rebasing run "git rebase --abort".
'
trace: built-in: git 'rev-parse' '--parseopt' '--' '--binary' '-3' '-k' '--resolvemsg=
When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To restore the original branch and stop rebasing run "git rebase --abort".
'
trace: built-in: git 'rev-parse' '--show-cdup'
trace: built-in: git 'rev-parse' '--is-inside-work-tree'
trace: exec: 'git-var' 'GIT_COMMITTER_IDENT'
trace: built-in: git 'mailsplit' '-d4' '-o.dotest' '-b' '--'
trace: built-in: git 'diff-index' '--cached' '--name-only' 'HEAD' '--'
trace: built-in: git 'mailinfo' '-k' '-u' '.dotest/msg' '.dotest/patch'
trace: built-in: git 'stripspace'
Applying modechange
trace: built-in: git 'apply' '--allow-binary-replacement' '--index' '.dotest/patch'
error: X: already exists in index
trace: built-in: git 'apply' '--build-fake-ancestor' '.dotest/patch-merge-tmp-index' '.dotest/patch'
trace: built-in: git 'write-tree'
Using index info to reconstruct a base tree...
trace: built-in: git 'apply' '--allow-binary-replacement' '--cached'
trace: built-in: git 'write-tree'
Falling back to patching base and 3-way merge...
Merging HEAD with modechange
Merging:
99f23d7 prepare
virtual modechange
found 1 common ancestor(s):
virtual 20d8b2c6c42a40f913517c72113d9d08e124064a
trace: built-in: git 'diff-index' '--quiet' '--cached' 'HEAD' '--'
trace: built-in: git 'write-tree'
trace: built-in: git 'rev-parse' '--verify' 'HEAD'
trace: built-in: git 'commit-tree' '98edf5feecb5ba7d79dcc596fc10fd9f643b58d8' '-p' '99f23d7aa2e080f8cd407e8f5acffec0285e7a1f'
trace: built-in: git 'update-ref' '-m' 'rebase: modechange' 'HEAD' '2599758eb56bbcb4e3b9c2368e0fd262d88cd71a' '99f23d7aa2e080f8cd407e8f5acffec0285e7a1f'
trace: built-in: git 'gc' '--auto'
trace: built-in: git 'rev-parse' 'HEAD'
trace: built-in: git 'update-ref' '-m' 'rebase finished: refs/heads/modechange onto 99f23d7aa2e080f8cd407e8f5acffec0285e7a1f' 'refs/heads/modechange' '2599758eb56bbcb4e3b9c2368e0fd262d88cd71a' '72a1ae66863bcb860c4d7835ac47c4fd35b8a46f'
trace: built-in: git 'symbolic-ref' 'HEAD' 'refs/heads/modechange'
*   ok 7: rebase a single mode change

* passed all 7 test(s)
*** t3401-rebase-partial.sh ***
* expecting success: echo First > A &&
     git update-index --add A &&
     git-commit -m "Add A." &&

     git-checkout -b my-topic-branch &&

     echo Second > B &&
     git update-index --add B &&
     git-commit -m "Add B." &&

     echo AnotherSecond > C &&
     git update-index --add C &&
     git-commit -m "Add C." &&

     git-checkout -f master &&

     echo Third >> A &&
     git update-index A &&
     git-commit -m "Modify A."

Created initial commit d4d2e8d: Add A.
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 A
Switched to a new branch "my-topic-branch"
Created commit 6ca1e96: Add B.
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 B
Created commit a797e8c: Add C.
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 C
Switched to branch "master"
Created commit ef986de: Modify A.
 1 files changed, 1 insertions(+), 0 deletions(-)
*   ok 1: prepare repository with topic branch

* expecting success: git cherry-pick my-topic-branch^0 &&
     git-checkout -f my-topic-branch &&
     git branch master-merge master &&
     git branch my-topic-branch-merge my-topic-branch

Merging HEAD with a797e8c... Add C.
Merging:
ef986de Modify A.
a797e8c Add C.
found 1 common ancestor(s):
6ca1e96 Add B.
Finished one cherry-pick.
Created commit c0914a4: Add C.
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 C
Switched to branch "my-topic-branch"
*   ok 2: pick top patch from topic branch into master

* expecting success: git-rebase master && test ! -d .dotest
First, rewinding head to replay your work on top of it...
HEAD is now at c0914a4... Add C.
Applying Add B.
*   ok 3: rebase topic branch against new master and check git-am did not get halted

* expecting success: git-checkout -f my-topic-branch-merge &&
	 git-rebase --merge master-merge &&
	 test ! -d .git/.dotest-merge
Switched to branch "my-topic-branch-merge"
First, rewinding head to replay your work on top of it...
HEAD is now at c0914a4... Add C.
Merging master-merge with HEAD~1
Merging:
c0914a4 Add C.
6ca1e96 Add B.
found 1 common ancestor(s):
d4d2e8d Add A.
Created commit a9d4751: Add B.
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 B
Committed: 0001 Add B.
Merging master-merge with HEAD~0
Merging:
a9d4751 Add B.
a797e8c Add C.
found 1 common ancestor(s):
6ca1e96 Add B.
Already applied: 0002 Add C.
All done.
*   ok 4: rebase --merge topic branch that was partially merged upstream

* passed all 4 test(s)
*** t3402-rebase-merge.sh ***
* expecting success: 
	git add original &&
	git commit -m"initial" &&
	git branch side &&
	echo "11 $T" >>original &&
	git commit -a -m"master updates a bit." &&

	echo "12 $T" >>original &&
	git commit -a -m"master updates a bit more." &&

	git checkout side &&
	(echo "0 $T" ; cat original) >renamed &&
	git add renamed &&
	git update-index --force-remove original &&
	git commit -a -m"side renames and edits." &&

	tr "[a-z]" "[A-Z]" <original >newfile &&
	git add newfile &&
	git commit -a -m"side edits further." &&

	tr "[a-m]" "[A-M]" <original >newfile &&
	rm -f original &&
	git commit -a -m"side edits once again." &&

	git branch test-rebase side &&
	git branch test-rebase-pick side &&
	git branch test-reference-pick side &&
	git checkout -b test-merge side

Created initial commit be07c91: initial
 1 files changed, 20 insertions(+), 0 deletions(-)
 create mode 100644 original
Created commit fa4d3c6: master updates a bit.
 1 files changed, 2 insertions(+), 0 deletions(-)
Created commit be31e25: master updates a bit more.
 1 files changed, 2 insertions(+), 0 deletions(-)
Switched to branch "side"
Created commit 82dc11b: side renames and edits.
 1 files changed, 2 insertions(+), 0 deletions(-)
 rename original => renamed (90%)
Created commit 22e319a: side edits further.
 1 files changed, 20 insertions(+), 0 deletions(-)
 create mode 100644 newfile
Created commit cb62284: side edits once again.
 1 files changed, 20 insertions(+), 20 deletions(-)
 rewrite newfile (100%)
Switched to a new branch "test-merge"
*   ok 1: setup

* expecting success: 
	git merge -s recursive "reference merge" HEAD master

Merging HEAD with master
Merging:
cb62284 side edits once again.
be31e25 master updates a bit more.
found 1 common ancestor(s):
be07c91 initial
Renamed original => renamed
Auto-merged renamed
Merge made by recursive.
 renamed |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
*   ok 2: reference merge

* expecting success: 
	git checkout test-rebase &&
	GIT_TRACE=1 git rebase --merge master

Switched to branch "test-rebase"
trace: exec: 'git-rebase' '--merge' 'master'
trace: built-in: git 'rev-parse' '--git-dir'
trace: built-in: git 'rev-parse' '--is-inside-work-tree'
trace: built-in: git 'rev-parse' '--show-cdup'
trace: built-in: git 'update-index' '--refresh'
trace: built-in: git 'diff-index' '--cached' '--name-status' '-r' 'HEAD' '--'
trace: built-in: git 'rev-parse' '--verify' 'master^0'
trace: built-in: git 'rev-parse' '--verify' 'master^0'
trace: built-in: git 'symbolic-ref' '-q' 'HEAD'
trace: built-in: git 'rev-parse' '--verify' 'test-rebase^0'
trace: built-in: git 'merge-base' 'be31e25b8d0b697b35153de8049f76548bbe5892' 'cb622844d0025f149b5c3c79db0e6ff63b388df1'
trace: built-in: git 'rev-parse' 'HEAD^0'
First, rewinding head to replay your work on top of it...
trace: built-in: git 'reset' '--hard' 'be31e25b8d0b697b35153de8049f76548bbe5892'
trace: exec: 'git-read-tree' '-v' '--reset' '-u' 'be31e25b8d0b697b35153de8049f76548bbe5892'
trace: built-in: git 'read-tree' '-v' '--reset' '-u' 'be31e25b8d0b697b35153de8049f76548bbe5892'
HEAD is now at be31e25... master updates a bit more.
trace: built-in: git 'rev-list' '--reverse' '--no-merges' 'be31e25b8d0b697b35153de8049f76548bbe5892..ORIG_HEAD'
trace: built-in: git 'rev-parse' '--verify' 'HEAD'
Merging master with HEAD~2
Merging:
be31e25 master updates a bit more.
82dc11b side renames and edits.
found 1 common ancestor(s):
be07c91 initial
Renamed original => renamed
Auto-merged renamed
trace: built-in: git 'ls-files' '-u'
trace: built-in: git 'diff-index' '--quiet' 'HEAD' '--'
trace: built-in: git 'commit' '-C' '82dc11bc031ab16a43ebc6b00fb287ed8c3cb41f'
Created commit 4b69833: side renames and edits.
 1 files changed, 2 insertions(+), 0 deletions(-)
 rename original => renamed (92%)
Committed: 0001 trace: built-in: git 'rev-list' '--pretty=oneline' '-1' '82dc11bc031ab16a43ebc6b00fb287ed8c3cb41f'
side renames and edits.
trace: built-in: git 'rev-parse' 'HEAD^0'
trace: built-in: git 'rev-parse' '--verify' 'HEAD'
Merging master with HEAD~1
Merging:
4b69833 side renames and edits.
22e319a side edits further.
found 1 common ancestor(s):
82dc11b side renames and edits.
trace: built-in: git 'ls-files' '-u'
trace: built-in: git 'diff-index' '--quiet' 'HEAD' '--'
trace: built-in: git 'commit' '-C' '22e319adedffc21f781a0523de7c908cf397ad11'
Created commit 289b294: side edits further.
 1 files changed, 20 insertions(+), 0 deletions(-)
 create mode 100644 newfile
Committed: 0002 trace: built-in: git 'rev-list' '--pretty=oneline' '-1' '22e319adedffc21f781a0523de7c908cf397ad11'
side edits further.
trace: built-in: git 'rev-parse' 'HEAD^0'
trace: built-in: git 'rev-parse' '--verify' 'HEAD'
Merging master with HEAD~0
Merging:
289b294 side edits further.
cb62284 side edits once again.
found 1 common ancestor(s):
22e319a side edits further.
trace: built-in: git 'ls-files' '-u'
trace: built-in: git 'diff-index' '--quiet' 'HEAD' '--'
trace: built-in: git 'commit' '-C' 'cb622844d0025f149b5c3c79db0e6ff63b388df1'
Created commit 954ab97: side edits once again.
 1 files changed, 20 insertions(+), 20 deletions(-)
 rewrite newfile (100%)
Committed: 0003 trace: built-in: git 'rev-list' '--pretty=oneline' '-1' 'cb622844d0025f149b5c3c79db0e6ff63b388df1'
side edits once again.
trace: built-in: git 'rev-parse' 'HEAD^0'
trace: built-in: git 'rev-parse' 'HEAD'
trace: built-in: git 'update-ref' '-m' 'rebase finished: refs/heads/test-rebase onto be31e25b8d0b697b35153de8049f76548bbe5892' 'refs/heads/test-rebase' '954ab97e2f8b6a9aa3eb6c67b92b8d80c089ef54' 'cb622844d0025f149b5c3c79db0e6ff63b388df1'
trace: built-in: git 'symbolic-ref' 'HEAD' 'refs/heads/test-rebase'
All done.
*   ok 3: rebase

* expecting success: 
	test $PRE_REBASE = $(git rev-parse test-rebase@{1})

*   ok 4: test-rebase@{1} is pre rebase

* expecting success: 
	git diff-tree -r test-rebase test-merge >difference &&
	if test -s difference
	then
		cat difference
		(exit 1)
	else
		echo happy
	fi

happy
*   ok 5: merge and rebase should match

* expecting success: 
	git reset --hard master &&
	git rebase --merge side

HEAD is now at be31e25... master updates a bit more.
First, rewinding head to replay your work on top of it...
HEAD is now at cb62284... side edits once again.
Merging side with HEAD~1
Merging:
cb62284 side edits once again.
fa4d3c6 master updates a bit.
found 1 common ancestor(s):
be07c91 initial
Renamed original => renamed
Auto-merged renamed
Created commit a905555: master updates a bit.
 1 files changed, 2 insertions(+), 0 deletions(-)
Committed: 0001 master updates a bit.
Merging side with HEAD~0
Merging:
a905555 master updates a bit.
be31e25 master updates a bit more.
found 1 common ancestor(s):
fa4d3c6 master updates a bit.
Renamed original => renamed
Auto-merged renamed
Created commit f318e92: master updates a bit more.
 1 files changed, 2 insertions(+), 0 deletions(-)
Committed: 0002 master updates a bit more.
All done.
*   ok 6: rebase the other way

* expecting success: 
	git diff-tree -r test-rebase test-merge >difference &&
	if test -s difference
	then
		cat difference
		(exit 1)
	else
		echo happy
	fi

happy
*   ok 7: merge and rebase should match

* expecting success: 
	git reset --hard side &&
	git rebase --merge --onto master side^^ &&
	mb=$(git merge-base master HEAD) &&
	if test "$mb" = "$(git rev-parse master)"
	then
		echo happy
	else
		git show-branch
		(exit 1)
	fi &&
	f=$(git diff-tree --name-only HEAD^ HEAD) &&
	g=$(git diff-tree --name-only HEAD^^ HEAD^) &&
	case "$f,$g" in
	newfile,newfile)
		echo happy ;;
	*)
		echo "$f"
		echo "$g"
		(exit 1)
	esac

HEAD is now at cb62284... side edits once again.
First, rewinding head to replay your work on top of it...
HEAD is now at be31e25... master updates a bit more.
Merging master with HEAD~1
Merging:
be31e25 master updates a bit more.
22e319a side edits further.
found 1 common ancestor(s):
82dc11b side renames and edits.
Skipped original (merged same as existing)
Created commit 13513e1: side edits further.
 1 files changed, 20 insertions(+), 0 deletions(-)
 create mode 100644 newfile
Committed: 0001 side edits further.
Merging master with HEAD~0
Merging:
13513e1 side edits further.
cb62284 side edits once again.
found 1 common ancestor(s):
22e319a side edits further.
Skipped original (merged same as existing)
Created commit 4eb0ded: side edits once again.
 1 files changed, 20 insertions(+), 20 deletions(-)
 rewrite newfile (100%)
Committed: 0002 side edits once again.
All done.
happy
happy
*   ok 8: picking rebase

* passed all 8 test(s)
*** t3403-rebase-skip.sh ***
* expecting success: 
	echo hello > hello &&
	git add hello &&
	git commit -m "hello" &&
	git branch skip-reference &&

	echo world >> hello &&
	git commit -a -m "hello world" &&
	echo goodbye >> hello &&
	git commit -a -m "goodbye" &&

	git checkout -f skip-reference &&
	echo moo > hello &&
	git commit -a -m "we should skip this" &&
	echo moo > cow &&
	git add cow &&
	git commit -m "this should not be skipped" &&
	git branch pre-rebase skip-reference &&
	git branch skip-merge skip-reference
	
Created initial commit b4ab5aa: hello
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 hello
Created commit faea3c2: hello world
 1 files changed, 1 insertions(+), 0 deletions(-)
Created commit c7f9f1e: goodbye
 1 files changed, 1 insertions(+), 0 deletions(-)
Switched to branch "skip-reference"
Created commit 3ef0daf: we should skip this
 1 files changed, 1 insertions(+), 1 deletions(-)
Created commit 5702346: this should not be skipped
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 cow
*   ok 1: setup

* expecting failure: 
	git rebase master

First, rewinding head to replay your work on top of it...
HEAD is now at c7f9f1e... goodbye
Applying we should skip this
error: patch failed: hello:1
error: hello: patch does not apply
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Merging HEAD with we should skip this
Merging:
c7f9f1e goodbye
virtual we should skip this
found 1 common ancestor(s):
virtual b4d01e9b0c4a9356736dfddf8830ba9a54f5271c
Auto-merged hello
CONFLICT (content): Merge conflict in hello
Failed to merge in the changes.
Patch failed at 0001.

When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To restore the original branch and stop rebasing run "git rebase --abort".

*   ok 2: rebase with git am -3 (default)

* expecting success: 
	git rebase --skip
	
HEAD is now at c7f9f1e... goodbye
Applying this should not be skipped
*   ok 3: rebase --skip with am -3

* expecting success: 
	test refs/heads/skip-reference = $(git symbolic-ref HEAD) &&
	git branch post-rebase &&
	git reset --hard pre-rebase &&
	! git rebase master &&
	echo "hello" > hello &&
	git add hello &&
	git rebase --continue &&
	test refs/heads/skip-reference = $(git symbolic-ref HEAD) &&
	git reset --hard post-rebase

HEAD is now at 5702346... this should not be skipped
First, rewinding head to replay your work on top of it...
HEAD is now at c7f9f1e... goodbye
Applying we should skip this
error: patch failed: hello:1
error: hello: patch does not apply
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Merging HEAD with we should skip this
Merging:
c7f9f1e goodbye
virtual we should skip this
found 1 common ancestor(s):
virtual b4d01e9b0c4a9356736dfddf8830ba9a54f5271c
Auto-merged hello
CONFLICT (content): Merge conflict in hello
Failed to merge in the changes.
Patch failed at 0001.

When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To restore the original branch and stop rebasing run "git rebase --abort".

Applying we should skip this
Applying this should not be skipped
HEAD is now at d031c42... this should not be skipped
*   ok 4: rebase moves back to skip-reference

* expecting success: git checkout -f skip-merge
Switched to branch "skip-merge"
*   ok 5: checkout skip-merge

* expecting failure: git rebase --merge master
First, rewinding head to replay your work on top of it...
HEAD is now at c7f9f1e... goodbye
Merging master with HEAD~1
Merging:
c7f9f1e goodbye
3ef0daf we should skip this
found 1 common ancestor(s):
b4ab5aa hello
Auto-merged hello
CONFLICT (content): Merge conflict in hello

When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To restore the original branch and stop rebasing run "git rebase --abort".

*   ok 6: rebase with --merge

* expecting success: 
	git rebase --skip
	
HEAD is now at c7f9f1e... goodbye
Merging master with HEAD~1
Merging:
c7f9f1e goodbye
5702346 this should not be skipped
found 1 common ancestor(s):
3ef0daf we should skip this
Created commit 54f9dba: this should not be skipped
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 cow
Committed: 0001 this should not be skipped
Merging master with HEAD~0
Merging:
54f9dba this should not be skipped
5702346 this should not be skipped
found 1 common ancestor(s):
3ef0daf we should skip this
Already applied: 0002 this should not be skipped
All done.
*   ok 7: rebase --skip with --merge

* expecting success: test -z "`git diff-tree skip-merge skip-reference`"
*   ok 8: merge and reference trees equal

* expecting success: 
	test refs/heads/skip-merge = $(git symbolic-ref HEAD)

*   ok 9: moved back to branch correctly

* passed all 9 test(s)
*** t3404-rebase-interactive.sh ***
* expecting success: 
	: > file1 &&
	git add file1 &&
	test_tick &&
	git commit -m A &&
	git tag A &&
	echo 1 > file1 &&
	test_tick &&
	git commit -m B file1 &&
	: > file2 &&
	git add file2 &&
	test_tick &&
	git commit -m C &&
	echo 2 > file1 &&
	test_tick &&
	git commit -m D file1 &&
	: > file3 &&
	git add file3 &&
	test_tick &&
	git commit -m E &&
	git checkout -b branch1 A &&
	: > file4 &&
	git add file4 &&
	test_tick &&
	git commit -m F &&
	git tag F &&
	echo 3 > file1 &&
	test_tick &&
	git commit -m G file1 &&
	: > file5 &&
	git add file5 &&
	test_tick &&
	git commit -m H &&
	git checkout -b branch2 F &&
	: > file6 &&
	git add file6 &&
	test_tick &&
	git commit -m I &&
	git tag I

Created initial commit 68c49ae: A
 0 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 file1
Created commit 13cd992: B
 1 files changed, 1 insertions(+), 0 deletions(-)
Created commit 2efaa29: C
 0 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 file2
Created commit 3a28ad5: D
 1 files changed, 1 insertions(+), 1 deletions(-)
Created commit cb54291: E
 0 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 file3
Switched to a new branch "branch1"
Created commit 2229234: F
 0 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 file4
Created commit 95757f7: G
 1 files changed, 1 insertions(+), 0 deletions(-)
Created commit 1599c04: H
 0 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 file5
Switched to a new branch "branch2"
Created commit cac536e: I
 0 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 file6
*   ok 1: setup

* expecting success: 
	git rebase -i F &&
	test $(git rev-parse I) = $(git rev-parse HEAD)

Rebasing (1/1)
Successfully rebased and updated refs/heads/branch2.
*   ok 2: no changes are a nop

* expecting success: 
	git checkout -b dead-end &&
	git rm file6 &&
	git commit -m "stop here" &&
	git rebase -i F branch2 &&
	test $(git rev-parse I) = $(git rev-parse HEAD)

Switched to a new branch "dead-end"
rm 'file6'
Created commit 384887c: stop here
 0 files changed, 0 insertions(+), 0 deletions(-)
 delete mode 100644 file6
Rebasing (1/1)
Successfully rebased and updated refs/heads/branch2.
*   ok 3: test the [branch] option

* expecting success: 
	git checkout branch1 &&
	git tag original-branch1 &&
	git rebase -i branch2 &&
	test file6 = $(git diff --name-only original-branch1) &&
	test $(git rev-parse I) = $(git rev-parse HEAD~2)

Switched to branch "branch1"
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated refs/heads/branch1.
*   ok 4: rebase on top of a non-conflicting commit

* expecting success: 
	test $(git rev-parse branch1@{1}) = $(git rev-parse original-branch1)

*   ok 5: reflog for the branch shows state before rebase

* expecting success: 
	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)

pick 5dafc3f G
pick 1254373 H

sed -n 2s/^pick/pick/p
pick 1254373 H
sed -n 1s/^pick/pick/p
pick 5dafc3f G
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated refs/heads/branch1.
*   ok 6: exchange two commits

* expecting success: 
	git tag new-branch1 &&
	! git rebase -i master &&
	diff -u expect .git/.dotest-merge/patch &&
	diff -u 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)

Rebasing (1/4)
Rebasing (2/4)
Rebasing (3/4)
Rebasing (4/4)
Merging HEAD with b7ca976... G
Merging:
53da4a1 H
b7ca976 G
found 1 common ancestor(s):
59dfff0 H
Auto-merged file1
CONFLICT (content): Merge conflict in file1
Automatic cherry-pick failed.  After resolving the conflicts,
mark the corrected paths with 'git add <paths>', and
run 'git rebase --continue'
Could not apply b7ca976... G
*   ok 7: stop on conflicting pick

* expecting success: 
	git rebase --abort &&
	test $(git rev-parse new-branch1) = $(git rev-parse HEAD) &&
	! test -d .git/.dotest-merge

*   ok 8: abort

* expecting success: 
	echo A > file7 &&
	git add file7 &&
	test_tick &&
	GIT_AUTHOR_NAME="Twerp Snog" git commit -m "different author" &&
	git tag twerp &&
	git rebase -i --onto master HEAD^ &&
	git show HEAD | grep "^Author: Twerp Snog"

Created commit fd57113: different author
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 file7
Rebasing (1/1)
Successfully rebased and updated refs/heads/branch1.
Author: Twerp Snog <author at example.com>
*   ok 9: retain authorship

* expecting success: 
	git reset --hard twerp &&
	echo B > file7 &&
	test_tick &&
	GIT_AUTHOR_NAME="Nitfol" git commit -m "nitfol" file7 &&
	echo "******************************" &&
	FAKE_LINES="1 squash 2" git rebase -i --onto master HEAD~2 &&
	test B = $(cat file7) &&
	test $(git rev-parse HEAD^) = $(git rev-parse master)

HEAD is now at fd57113... different author
Created commit 8b8816f: nitfol
 1 files changed, 1 insertions(+), 1 deletions(-)
******************************
pick fd57113 different author
pick 8b8816f nitfol

sed -n 1s/^pick/pick/p
pick fd57113 different author
sed -n 2s/^pick/squash/p
pick 8b8816f nitfol
Rebasing (1/2)
Rebasing (2/2)
Created commit 61163db: different author
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 file7
Successfully rebased and updated refs/heads/branch1.
*   ok 10: squash

* expecting success: 
	git show HEAD | grep "^Author: Twerp Snog"

Author: Twerp Snog <author at example.com>
*   ok 11: retain authorship when squashing

* expecting success: 
	HEAD=$(git rev-parse HEAD) &&
	git rebase -i -p HEAD^ &&
	test $HEAD = $(git rev-parse HEAD)

Rebasing (1/1)
Successfully rebased and updated refs/heads/branch1.
*   ok 12: -p handles "no changes" gracefully

* expecting success: 
	git checkout -b to-be-preserved master^ &&
	: > unrelated-file &&
	git add unrelated-file &&
	test_tick &&
	git commit -m "unrelated" &&
	git checkout -b to-be-rebased master &&
	echo B > file1 &&
	test_tick &&
	git commit -m J file1 &&
	test_tick &&
	git merge to-be-preserved &&
	echo C > file1 &&
	test_tick &&
	git commit -m K file1 &&
	test_tick &&
	git rebase -i -p --onto branch1 master &&
	test $(git rev-parse HEAD^^2) = $(git rev-parse to-be-preserved) &&
	test $(git rev-parse HEAD~3) = $(git rev-parse branch1) &&
	test $(git show HEAD:file1) = C &&
	test $(git show HEAD~2:file1) = B

Switched to a new branch "to-be-preserved"
Created commit 9604163: unrelated
 0 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 unrelated-file
Switched to a new branch "to-be-rebased"
Created commit 820e66c: J
 1 files changed, 1 insertions(+), 1 deletions(-)
Merging HEAD with to-be-preserved
Merging:
820e66c J
9604163 unrelated
found 1 common ancestor(s):
3a28ad5 D
Merge made by recursive.
 0 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 unrelated-file
Created commit 319b784: K
 1 files changed, 1 insertions(+), 1 deletions(-)
Rebasing (1/4)
Rebasing (2/4)
Rebasing (3/4)
Rebasing (4/4)
Successfully rebased and updated refs/heads/to-be-rebased.
*   ok 13: preserve merges with -p

* expecting success: 
	test_tick &&
	! git rebase -i --onto new-branch1 HEAD^ &&
	echo resolved > file1 &&
	git add file1 &&
	FAKE_COMMIT_MESSAGE="chouette!" git rebase --continue &&
	test $(git rev-parse HEAD^) = $(git rev-parse new-branch1) &&
	git show HEAD | grep chouette

Rebasing (1/1)
Merging HEAD with 00ab401... K
Merging:
b7ca976 G
00ab401 K
found 1 common ancestor(s):
580c95c Merge branch 'to-be-preserved' into to-be-rebased
Skipped file4 (merged same as existing)
Skipped file5 (merged same as existing)
Skipped file6 (merged same as existing)
Auto-merged file1
CONFLICT (content): Merge conflict in file1
Automatic cherry-pick failed.  After resolving the conflicts,
mark the corrected paths with 'git add <paths>', and
run 'git rebase --continue'
Could not apply 00ab401... K
Created commit 22d27ff: chouette!
 1 files changed, 1 insertions(+), 1 deletions(-)
Rebasing (1/1)
Successfully rebased and updated refs/heads/to-be-rebased.
    chouette!
*   ok 14: --continue tries to commit

* expecting success: 
	git reset --hard HEAD@{1} &&
	test_tick &&
	! git rebase -v -i --onto new-branch1 HEAD^ &&
	echo resolved > file1 &&
	git add file1 &&
	git rebase --continue > output &&
	grep "^ file1 |    2 +-$" output

HEAD is now at b7ca976... G
Note: moving to "b7ca9764908a6bf2e083fda164fb82c931944108" which isn't a local branch
If you want to create a new branch from this checkout, you may do so
(now or later) by using -b with the checkout command again. Example:
  git checkout -b <new_branch_name>
HEAD is now at b7ca976... G
Rebasing (1/1)
b7ca9764908a6bf2e083fda164fb82c931944108
Merging b7ca976... G with b7ca976... G
Merging:
b7ca976 G
b7ca976 G
found 1 common ancestor(s):
59dfff0 H
Finished one cherry-pick.
# Not currently on any branch.
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#	expect
#	expect2
#	fake-editor.sh
nothing added to commit but untracked files present (use "git add" to track)
Could not apply b7ca976... G
Successfully rebased and updated refs/heads/to-be-rebased.
 file1 |    2 +-
*   ok 15: verbose flag is heeded, even after --continue

* expecting success: 
	base=$(git rev-parse HEAD~4) &&
	FAKE_COMMIT_AMEND="ONCE" FAKE_LINES="1 squash 2 squash 3 squash 4" \
		git rebase -i $base &&
	test $base = $(git rev-parse HEAD^) &&
	test 1 = $(git show | grep ONCE | wc -l)

pick cac536e I
pick 59dfff0 H
pick b7ca976 G
pick 322f578 G

sed -n 1s/^pick/pick/p
pick cac536e I
sed -n 2s/^pick/squash/p
pick 59dfff0 H
sed -n 3s/^pick/squash/p
pick b7ca976 G
sed -n 4s/^pick/squash/p
pick 322f578 G
Rebasing (1/4)
Rebasing (2/4)
Rebasing (3/4)
Rebasing (4/4)
Created commit 08179e9: I
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 file5
 create mode 100644 file6
Successfully rebased and updated refs/heads/to-be-rebased.
*   ok 16: multi-squash only fires up editor once

* expecting success: 
	for n in one two three four
	do
		echo $n >> file$n &&
		git add file$n &&
		git commit -m $n
	done &&
	one=$(git rev-parse HEAD~3) &&
	FAKE_LINES="1 squash 3 2" git rebase -i HEAD~3 &&
	test $one = $(git rev-parse HEAD~2)

Created commit af3ee56: one
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 fileone
Created commit 89e2cb1: two
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 filetwo
Created commit bc1dea8: three
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 filethree
Created commit bb02d61: four
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 filefour
pick 89e2cb1 two
pick bc1dea8 three
pick bb02d61 four

sed -n 1s/^pick/pick/p
pick 89e2cb1 two
sed -n 3s/^pick/squash/p
pick bb02d61 four
sed -n 2s/^pick/pick/p
pick bc1dea8 three
Rebasing (1/3)
Rebasing (2/3)
Created commit bd94cb6: two
 2 files changed, 2 insertions(+), 0 deletions(-)
 create mode 100644 filefour
 create mode 100644 filetwo
Rebasing (3/3)
Successfully rebased and updated refs/heads/to-be-rebased.
*   ok 17: squash works as expected

* expecting success: 
	for n in one two three four
	do
		echo $n >> conflict &&
		git add conflict &&
		git commit -m $n
	done &&
	one=$(git rev-parse HEAD~3) &&
	! FAKE_LINES="1 squash 3 2" git rebase -i HEAD~3 &&
	(echo one; echo two; echo four) > conflict &&
	git add conflict &&
	! git rebase --continue &&
	echo resolved > conflict &&
	git add conflict &&
	git rebase --continue &&
	test $one = $(git rev-parse HEAD~2)

Created commit 43eca34: one
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 conflict
Created commit 6cbd808: two
 1 files changed, 1 insertions(+), 0 deletions(-)
Created commit 48c458a: three
 1 files changed, 1 insertions(+), 0 deletions(-)
Created commit 8f1c3c6: four
 1 files changed, 1 insertions(+), 0 deletions(-)
pick 6cbd808 two
pick 48c458a three
pick 8f1c3c6 four

sed -n 1s/^pick/pick/p
pick 6cbd808 two
sed -n 3s/^pick/squash/p
pick 8f1c3c6 four
sed -n 2s/^pick/pick/p
pick 48c458a three
Rebasing (1/3)
Rebasing (2/3)
Merging HEAD with 8f1c3c6... four
Merging:
virtual HEAD
8f1c3c6 four
found 1 common ancestor(s):
48c458a three
Auto-merged conflict
CONFLICT (content): Merge conflict in conflict
Automatic cherry-pick failed.  After resolving the conflicts,
mark the corrected paths with 'git add <paths>', and
run 'git rebase --continue'

Could not apply 8f1c3c6... four

Created commit 92ea66c: two
 1 files changed, 2 insertions(+), 0 deletions(-)
Rebasing (3/3)
Merging HEAD with 48c458a... three
Merging:
92ea66c two
48c458a three
found 1 common ancestor(s):
6cbd808 two
Auto-merged conflict
CONFLICT (content): Merge conflict in conflict
Automatic cherry-pick failed.  After resolving the conflicts,
mark the corrected paths with 'git add <paths>', and
run 'git rebase --continue'
Could not apply 48c458a... three
Created commit 5692d8f: three
 1 files changed, 1 insertions(+), 3 deletions(-)
Rebasing (3/3)
Successfully rebased and updated refs/heads/to-be-rebased.
*   ok 18: interrupted squash works as expected

* expecting success: 
	for n in one two three four
	do
		echo $n >> conflict &&
		git add conflict &&
		git commit -m $n
	done &&
	one=$(git rev-parse HEAD~3) &&
	! FAKE_LINES="3 squash 1 2" git rebase -i HEAD~3 &&
	(echo one; echo four) > conflict &&
	git add conflict &&
	! git rebase --continue &&
	(echo one; echo two; echo four) > conflict &&
	git add conflict &&
	! git rebase --continue &&
	echo resolved > conflict &&
	git add conflict &&
	git rebase --continue &&
	test $one = $(git rev-parse HEAD~2)

Created commit 06e6be6: one
 1 files changed, 1 insertions(+), 0 deletions(-)
Created commit 1873c61: two
 1 files changed, 1 insertions(+), 0 deletions(-)
Created commit 78236b8: three
 1 files changed, 1 insertions(+), 0 deletions(-)
Created commit bdf179f: four
 1 files changed, 1 insertions(+), 0 deletions(-)
pick 1873c61 two
pick 78236b8 three
pick bdf179f four

sed -n 3s/^pick/pick/p
pick bdf179f four
sed -n 1s/^pick/squash/p
pick 1873c61 two
sed -n 2s/^pick/pick/p
pick 78236b8 three
Rebasing (1/3)
Merging HEAD with bdf179f... four
Merging:
06e6be6 one
bdf179f four
found 1 common ancestor(s):
78236b8 three
Auto-merged conflict
CONFLICT (content): Merge conflict in conflict
Automatic cherry-pick failed.  After resolving the conflicts,
mark the corrected paths with 'git add <paths>', and
run 'git rebase --continue'
Could not apply bdf179f... four
Created commit a722876: four
 1 files changed, 1 insertions(+), 1 deletions(-)
Rebasing (2/3)
Merging HEAD with 1873c61... two
Merging:
virtual HEAD
1873c61 two
found 1 common ancestor(s):
06e6be6 one
Auto-merged conflict
CONFLICT (content): Merge conflict in conflict
Automatic cherry-pick failed.  After resolving the conflicts,
mark the corrected paths with 'git add <paths>', and
run 'git rebase --continue'

Could not apply 1873c61... two

Created commit df6b72a: four
 1 files changed, 2 insertions(+), 1 deletions(-)
Rebasing (3/3)
Merging HEAD with 78236b8... three
Merging:
df6b72a four
78236b8 three
found 1 common ancestor(s):
1873c61 two
Auto-merged conflict
CONFLICT (content): Merge conflict in conflict
Automatic cherry-pick failed.  After resolving the conflicts,
mark the corrected paths with 'git add <paths>', and
run 'git rebase --continue'
Could not apply 78236b8... three
Created commit b1b8d99: three
 1 files changed, 1 insertions(+), 3 deletions(-)
Rebasing (3/3)
Successfully rebased and updated refs/heads/to-be-rebased.
*   ok 19: interrupted squash works as expected (case 2)

* expecting success: 
	HEAD=$(git rev-parse HEAD) &&
	git checkout -b has-cherry-picked HEAD^ &&
	echo unrelated > file7 &&
	git add file7 &&
	test_tick &&
	git commit -m "unrelated change" &&
	git cherry-pick $HEAD &&
	EXPECT_COUNT=1 git rebase -i $HEAD &&
	test $HEAD = $(git rev-parse HEAD^)

Switched to a new branch "has-cherry-picked"
Created commit 8687920: unrelated change
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 file7
Merging HEAD with b1b8d99... three
Merging:
8687920 unrelated change
b1b8d99 three
found 1 common ancestor(s):
df6b72a four
Finished one cherry-pick.
Created commit 4926672: three
 1 files changed, 1 insertions(+), 3 deletions(-)
Rebasing (1/1)
Successfully rebased and updated refs/heads/has-cherry-picked.
*   ok 20: ignore patch if in upstream

* expecting success: 
	parent=$(git rev-parse HEAD^) &&
	test_tick &&
	FAKE_LINES="edit 1" git rebase -i HEAD^ &&
	echo edited > file7 &&
	git add file7 &&
	FAKE_COMMIT_MESSAGE="chouette!" git rebase --continue &&
	test edited = $(git show HEAD:file7) &&
	git show HEAD | grep chouette &&
	test $parent = $(git rev-parse HEAD^)

pick 7b350c8 unrelated change

sed -n 1s/^pick/edit/p
pick 7b350c8 unrelated change
Rebasing (1/1)
You can amend the commit now, with

	git commit --amend

Created commit 61e4775: chouette!
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 file7
Rebasing (1/1)
Successfully rebased and updated refs/heads/has-cherry-picked.
    chouette!
*   ok 21: --continue tries to commit, even for "edit"

* expecting success: 
	grandparent=$(git rev-parse HEAD~2) &&
	git checkout $(git rev-parse HEAD) &&
	test_tick &&
	FAKE_LINES="2 1" git rebase -i HEAD~2 &&
	test $grandparent = $(git rev-parse HEAD~2)

Note: moving to "61e4775ee4ffac502cf6641c5a42a7ef26fdd3f3" which isn't a local branch
If you want to create a new branch from this checkout, you may do so
(now or later) by using -b with the checkout command again. Example:
  git checkout -b <new_branch_name>
HEAD is now at 61e4775... chouette!
pick b1b8d99 three
pick 61e4775 chouette!

sed -n 2s/^pick/pick/p
pick 61e4775 chouette!
sed -n 1s/^pick/pick/p
pick b1b8d99 three
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
*   ok 22: rebase a detached HEAD

* expecting success: 

	mkdir -p .git/hooks &&
	PRE_COMMIT=.git/hooks/pre-commit &&
	echo "#!/bin/sh" > $PRE_COMMIT &&
	echo "test -z \"\$(git diff --cached --check)\"" >> $PRE_COMMIT &&
	chmod a+x $PRE_COMMIT &&
	echo "monde! " >> file1 &&
	test_tick &&
	! git commit -m doesnt-verify file1 &&
	git commit -m doesnt-verify --no-verify file1 &&
	test_tick &&
	FAKE_LINES=2 git rebase -i HEAD~2


Created commit a5197ad: doesnt-verify
 1 files changed, 1 insertions(+), 0 deletions(-)
pick 90212e9 three
pick a5197ad doesnt-verify

sed -n 2s/^pick/pick/p
pick a5197ad doesnt-verify
Rebasing (1/1)
Successfully rebased and updated detached HEAD.
*   ok 23: rebase a commit violating pre-commit

* expecting success: 

	rm -fr .git/hooks &&
	git reset --hard &&
	git checkout -b branch3 A &&

	(
		GIT_AUTHOR_NAME="Squashed Away" &&
		export GIT_AUTHOR_NAME &&
		>HEAD &&
		git add HEAD &&
		git commit -m "Add head" &&
		>BODY &&
		git add BODY &&
		git commit -m "Add body"
	) &&

	FAKE_LINES="1 squash 2" git rebase -i to-be-rebased &&
	test "$(git show -s --pretty=format:%an)" = "Squashed Away"


HEAD is now at 7bc9b7f... doesnt-verify
Previous HEAD position was 7bc9b7f... doesnt-verify
Switched to a new branch "branch3"
Created commit 90cfc43: Add head
 0 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 HEAD
Created commit 9e5121f: Add body
 0 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 BODY
pick 90cfc43 Add head
pick 9e5121f Add body

sed -n 1s/^pick/pick/p
pick 90cfc43 Add head
sed -n 2s/^pick/squash/p
pick 9e5121f Add body
Rebasing (1/2)
Rebasing (2/2)
Created commit 3aa14e5: Add head
 0 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 BODY
 create mode 100644 HEAD
Successfully rebased and updated refs/heads/branch3.
*   ok 24: rebase with a file named HEAD in worktree

* passed all 24 test(s)
*** t3405-rebase-malformed.sh ***
* expecting success: 

	>file1 &&
	>file2 &&
	git add file1 file2 &&
	test_tick &&
	git commit -m "Initial commit" &&

	git checkout -b side &&
	cat F >file2 &&
	git add file2 &&
	test_tick &&
	git commit -F F &&

	git cat-file commit HEAD | sed -e "1,/^\$/d" >F0 &&

	git checkout master &&

	echo One >file1 &&
	test_tick &&
	git add file1 &&
	git commit -m "Second commit"

Created initial commit a8d727e: Initial commit
 0 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 file1
 create mode 100644 file2
Switched to a new branch "side"
Created commit 5037af6: This is an example of a commit log message
 1 files changed, 5 insertions(+), 0 deletions(-)
Switched to branch "master"
Created commit a4fc158: Second commit
 1 files changed, 1 insertions(+), 0 deletions(-)
*   ok 1: setup

* expecting success: 

	git rebase master side &&
	git cat-file commit HEAD | sed -e "1,/^\$/d" >F1 &&

	diff -u F0 F1 &&
	diff -u F F0

Switched to branch "side"
First, rewinding head to replay your work on top of it...
HEAD is now at a4fc158... Second commit
Applying This is an example of a commit log message
that does not  conform to git commit convention.
*   ok 2: rebase

* passed all 2 test(s)
*** t3406-rebase-message.sh ***
* expecting success: 
	quick_one O &&
	git branch topic &&
	quick_one X &&
	quick_one A &&
	quick_one B &&
	quick_one Y &&

	git checkout topic &&
	quick_one A &&
	quick_one B &&
	quick_one Z


Created initial commit 3749684: O
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 fileO
Created commit a2df67f: X
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 fileX
Created commit 9491ce3: A
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 fileA
Created commit 83a6553: B
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 fileB
Created commit 545b0d0: Y
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 fileY
Switched to branch "topic"
Created commit 3729d39: A
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 fileA
Created commit 85d7b9e: B
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 fileB
Created commit 341b972: Z
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 fileZ
*   ok 1: setup

* expecting success: 

	git rebase -m master >report &&
	sed -n -e "/^Already applied: /p" \
		-e "/^Committed: /p" report >actual &&
	diff -u expect actual


*   ok 2: rebase -m

* passed all 2 test(s)
*** t3500-cherry.sh ***
* expecting success: echo First > A &&
     git update-index --add A &&
     git-commit -m "Add A." &&

     git-checkout -b my-topic-branch &&

     echo Second > B &&
     git update-index --add B &&
     git-commit -m "Add B." &&

     sleep 2 &&
     echo AnotherSecond > C &&
     git update-index --add C &&
     git-commit -m "Add C." &&

     git-checkout -f master &&
     rm -f B C &&

     echo Third >> A &&
     git update-index A &&
     git-commit -m "Modify A." &&

     expr "$(echo $(git cherry master my-topic-branch) )" : "+ [^ ]* + .*"

Created initial commit 413c9da: Add A.
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 A
Switched to a new branch "my-topic-branch"
Created commit b0c4a41: Add B.
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 B
Created commit 561e0d8: Add C.
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 C
Switched to branch "master"
Created commit c8c6049: Modify A.
 1 files changed, 1 insertions(+), 0 deletions(-)
85
*   ok 1: prepare repository with topic branch, and check cherry finds the 2 patches from there

* expecting success: expr "$(echo $(git cherry master my-topic-branch my-topic-branch^1) )" : "+ [^ ]*"

42
*   ok 2: check that cherry with limit returns only the top patch

* expecting success: git cherry-pick my-topic-branch^0 &&
     echo $(git cherry master my-topic-branch) &&
     expr "$(echo $(git cherry master my-topic-branch) )" : "+ [^ ]* - .*"

Merging HEAD with 561e0d8... Add C.
Merging:
c8c6049 Modify A.
561e0d8 Add C.
found 1 common ancestor(s):
b0c4a41 Add B.
Finished one cherry-pick.
Created commit ad69f8b: Add C.
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 C
+ b0c4a4183739660ae6aac396b6be1d4879e64ce3 - 561e0d88be690ef76bec02a9815a5698ee27bf4f
85
*   ok 3: cherry-pick one of the 2 patches, and check cherry recognized one and only one as new

* passed all 3 test(s)
*** t3501-revert-cherry-pick.sh ***
* expecting success: 

	for l in a b c d e f g h i j k l m n o
	do
		echo $l$l$l$l$l$l$l$l$l
	done >oops &&

	test_tick &&
	git add oops &&
	git commit -m initial &&
	git tag initial &&

	test_tick &&
	echo "Add extra line at the end" >>oops &&
	git commit -a -m added &&
	git tag added &&

	test_tick &&
	git mv oops spoo &&
	git commit -m rename1 &&
	git tag rename1 &&

	test_tick &&
	git checkout -b side initial &&
	git mv oops opos &&
	git commit -m rename2 &&
	git tag rename2

Created initial commit a242c62: initial
 1 files changed, 15 insertions(+), 0 deletions(-)
 create mode 100644 oops
Created commit 4399171: added
 1 files changed, 1 insertions(+), 0 deletions(-)
Created commit 31df260: rename1
 1 files changed, 0 insertions(+), 0 deletions(-)
 rename oops => spoo (100%)
Switched to a new branch "side"
Created commit f6d0551: rename2
 1 files changed, 0 insertions(+), 0 deletions(-)
 rename oops => opos (100%)
*   ok 1: setup

* expecting success: 

	git checkout rename2 &&
	git cherry-pick added &&
	test -f opos &&
	grep "Add extra line at the end" opos


Note: moving to "rename2" which isn't a local branch
If you want to create a new branch from this checkout, you may do so
(now or later) by using -b with the checkout command again. Example:
  git checkout -b <new_branch_name>
HEAD is now at f6d0551... rename2
Merging HEAD with 4399171... added
Merging:
f6d0551 rename2
4399171 added
found 1 common ancestor(s):
a242c62 initial
Finished one cherry-pick.
Created commit 2da2754: added
 1 files changed, 1 insertions(+), 0 deletions(-)
Add extra line at the end
*   ok 2: cherry-pick after renaming branch

* expecting success: 

	git checkout rename1 &&
	git revert added &&
	test -f spoo &&
	! grep "Add extra line at the end" spoo


HEAD is now at 31df260... rename1
Merging HEAD with 4399171... added
Merging:
31df260 rename1
a242c62 initial
found 1 common ancestor(s):
4399171 added
Finished one revert.
Created commit 9990ddc: Revert "added"
 1 files changed, 0 insertions(+), 1 deletions(-)
*   ok 3: revert after renaming branch

* passed all 3 test(s)
*** t3502-cherry-pick-merge.sh ***
* expecting success: 

	>A &&
	>B &&
	git add A B &&
	git commit -m "Initial" &&
	git tag initial &&
	git branch side &&
	echo new line >A &&
	git commit -m "add line to A" A &&
	git tag a &&
	git checkout side &&
	echo new line >B &&
	git commit -m "add line to B" B &&
	git tag b &&
	git checkout master &&
	git merge side &&
	git tag c


Created initial commit 1712366: Initial
 0 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 A
 create mode 100644 B
Created commit be3b569: add line to A
 1 files changed, 1 insertions(+), 0 deletions(-)
Switched to branch "side"
Created commit cd72c2d: add line to B
 1 files changed, 1 insertions(+), 0 deletions(-)
Switched to branch "master"
Merging HEAD with side
Merging:
be3b569 add line to A
cd72c2d add line to B
found 1 common ancestor(s):
1712366 Initial
Merge made by recursive.
 B |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
*   ok 1: setup

* expecting success: 

	git reset --hard &&
	git checkout a^0 &&
	! git cherry-pick -m 1 b &&
	git diff --exit-code a --


HEAD is now at 7c391ba... Merge branch 'side'
Note: moving to "a^0" which isn't a local branch
If you want to create a new branch from this checkout, you may do so
(now or later) by using -b with the checkout command again. Example:
  git checkout -b <new_branch_name>
HEAD is now at be3b569... add line to A
fatal: Mainline was specified but commit cd72c2d670cd8a7b827852ac68d66f881831c417 is not a merge.
*   ok 2: cherry-pick a non-merge with -m should fail

* expecting success: 

	git reset --hard &&
	git checkout a^0 &&
	! git cherry-pick c &&
	git diff --exit-code a --


HEAD is now at be3b569... add line to A
HEAD is now at be3b569... add line to A
fatal: Commit 7c391bad3533746914eb1bad9db0a0859cbbe493 is a merge but no -m option was given.
*   ok 3: cherry pick a merge without -m should fail

* expecting success: 

	git reset --hard &&
	git checkout a^0 &&
	git cherry-pick -m 1 c &&
	git diff --exit-code c


HEAD is now at be3b569... add line to A
HEAD is now at be3b569... add line to A
Merging HEAD with 7c391ba... Merge branch 'side'
Merging:
be3b569 add line to A
7c391ba Merge branch 'side'
found 1 common ancestor(s):
be3b569 add line to A
Finished one cherry-pick.
Created commit d5a4d08: Merge branch 'side'
 1 files changed, 1 insertions(+), 0 deletions(-)
*   ok 4: cherry pick a merge (1)

* expecting success: 

	git reset --hard &&
	git checkout b^0 &&
	git cherry-pick -m 2 c &&
	git diff --exit-code c


HEAD is now at d5a4d08... Merge branch 'side'
HEAD is now at cd72c2d... add line to B
Merging HEAD with 7c391ba... Merge branch 'side'
Merging:
cd72c2d add line to B
7c391ba Merge branch 'side'
found 1 common ancestor(s):
cd72c2d add line to B
Finished one cherry-pick.
Created commit e0dbebe: Merge branch 'side'
 1 files changed, 1 insertions(+), 0 deletions(-)
*   ok 5: cherry pick a merge (2)

* expecting success: 

	git reset --hard &&
	git checkout b^0 &&
	! git cherry-pick -m 3 c


HEAD is now at e0dbebe... Merge branch 'side'
HEAD is now at cd72c2d... add line to B
fatal: Commit 7c391bad3533746914eb1bad9db0a0859cbbe493 does not have parent 3
*   ok 6: cherry pick a merge relative to nonexistent parent should fail

* expecting success: 

	git reset --hard &&
	git checkout c^0 &&
	! git revert -m 1 b &&
	git diff --exit-code c


HEAD is now at cd72c2d... add line to B
HEAD is now at 7c391ba... Merge branch 'side'
fatal: Mainline was specified but commit cd72c2d670cd8a7b827852ac68d66f881831c417 is not a merge.
*   ok 7: revert a non-merge with -m should fail

* expecting success: 

	git reset --hard &&
	git checkout c^0 &&
	! git revert c &&
	git diff --exit-code c


HEAD is now at 7c391ba... Merge branch 'side'
HEAD is now at 7c391ba... Merge branch 'side'
fatal: Commit 7c391bad3533746914eb1bad9db0a0859cbbe493 is a merge but no -m option was given.
*   ok 8: revert a merge without -m should fail

* expecting success: 

	git reset --hard &&
	git checkout c^0 &&
	git revert -m 1 c &&
	git diff --exit-code a --


HEAD is now at 7c391ba... Merge branch 'side'
HEAD is now at 7c391ba... Merge branch 'side'
Merging HEAD with 7c391ba... Merge branch 'side'
Merging:
7c391ba Merge branch 'side'
be3b569 add line to A
found 1 common ancestor(s):
7c391ba Merge branch 'side'
Finished one revert.
Created commit 7a3e281: Revert "Merge branch 'side'"
 1 files changed, 0 insertions(+), 1 deletions(-)
*   ok 9: revert a merge (1)

* expecting success: 

	git reset --hard &&
	git checkout c^0 &&
	git revert -m 2 c &&
	git diff --exit-code b --


HEAD is now at 7a3e281... Revert "Merge branch 'side'"
HEAD is now at 7c391ba... Merge branch 'side'
Merging HEAD with 7c391ba... Merge branch 'side'
Merging:
7c391ba Merge branch 'side'
cd72c2d add line to B
found 1 common ancestor(s):
7c391ba Merge branch 'side'
Finished one revert.
Created commit 3689b6a: Revert "Merge branch 'side'"
 1 files changed, 0 insertions(+), 1 deletions(-)
*   ok 10: revert a merge (2)

* expecting success: 

	git reset --hard &&
	git checkout c^0 &&
	! git revert -m 3 c &&
	git diff --exit-code c


HEAD is now at 3689b6a... Revert "Merge branch 'side'"
HEAD is now at 7c391ba... Merge branch 'side'
fatal: Commit 7c391bad3533746914eb1bad9db0a0859cbbe493 does not have parent 3
*   ok 11: revert a merge relative to nonexistent parent should fail

* passed all 11 test(s)
*** t3600-rm.sh ***
* expecting success: touch -- foo bar baz 'space embedded' -q &&
     git add -- foo bar baz 'space embedded' -q &&
     git-commit -m 'add normal files' &&
     test_tabs=y &&
     if touch -- 'tab	embedded' 'newline
embedded'
     then
     git add -- 'tab	embedded' 'newline
embedded' &&
     git-commit -m 'add files with tabs and newlines'
     else
         say 'Your filesystem does not allow tabs in filenames.'
         test_tabs=n
     fi
Created initial commit 519f188: add normal files
 0 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 -q
 create mode 100644 bar
 create mode 100644 baz
 create mode 100644 foo
 create mode 100644 space embedded
Created commit 3a77e15: add files with tabs and newlines
 0 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 "newline\nembedded"
 create mode 100644 "tab\tembedded"
*   ok 1: Initialize test directory

* expecting success: : >test-file
     chmod a-w .
     rm -f test-file
     test -f test-file && test_failed_remove=y
     chmod 775 .
     rm -f test-file
rm: cannot remove `test-file': Permission denied
*   ok 2: Determine rm behavior

* expecting success: [ -f foo ] && git ls-files --error-unmatch foo
foo
*   ok 3: Pre-check that foo exists and is in index before git rm foo

* expecting success: git rm --cached foo
rm 'foo'
*   ok 4: Test that git rm foo succeeds

* expecting success: echo content > foo
     git add foo
     git rm --cached foo
rm 'foo'
*   ok 5: Test that git rm --cached foo succeeds if the index matches the file

* expecting success: echo content > foo
     git add foo
     git commit -m foo
     echo "other content" > foo
     git rm --cached foo
Created commit c9d18ca: foo
 1 files changed, 1 insertions(+), 0 deletions(-)
rm 'foo'
*   ok 6: Test that git rm --cached foo succeeds if the index matches the file

* expecting failure: echo content > foo
     git add foo
     git commit -m foo
     echo "other content" > foo
     git add foo
     echo "yet another content" > foo
     git rm --cached foo
# On branch master
nothing to commit (working directory clean)
error: 'foo' has staged content different from both the file and the HEAD
(use -f to force removal)
*   ok 7: Test that git rm --cached foo fails if the index matches neither the file nor HEAD

* expecting success: echo content > foo
     git add foo
     git commit -m foo
     echo "other content" > foo
     git add foo
     echo "yet another content" > foo
     git rm --cached -f foo
# On branch master
nothing to commit (working directory clean)
rm 'foo'
*   ok 8: Test that git rm --cached -f foo works in case where --cached only did not

* expecting success: [ -f foo ] && ! git ls-files --error-unmatch foo
error: pathspec 'foo' did not match any file(s) known to git.
Did you forget to 'git add'?
*   ok 9: Post-check that foo exists but is not in index after git rm foo

* expecting success: [ -f bar ] && git ls-files --error-unmatch bar
bar
*   ok 10: Pre-check that bar exists and is in index before "git rm bar"

* expecting success: git rm bar
rm 'bar'
*   ok 11: Test that "git rm bar" succeeds

* expecting success: ! [ -f bar ] && ! git ls-files --error-unmatch bar
error: pathspec 'bar' did not match any file(s) known to git.
Did you forget to 'git add'?
*   ok 12: Post-check that bar does not exist and is not in index after "git rm -f bar"

* expecting success: git rm -- -q
rm '-q'
*   ok 13: Test that "git rm -- -q" succeeds (remove a file that looks like an option)

* expecting success: git rm -f 'space embedded' 'tab	embedded' 'newline
embedded'
rm 'newline
embedded'
rm 'space embedded'
rm 'tab	embedded'
*   ok 14: Test that "git rm -f" succeeds with embedded space, tab, or newline characters.

* expecting failure: git rm -f baz
fatal: git-rm: baz: Permission denied
rm 'baz'
*   ok 15: Test that "git rm -f" fails if its rm fails

* expecting success: git ls-files --error-unmatch baz
baz
*   ok 16: When the rm in "git rm -f" fails, it should not remove the file from the index

* expecting success: 
	git rm --ignore-unmatch nonexistent

*   ok 17: Remove nonexistent file with --ignore-unmatch

* expecting success: 
	echo frotz > test-file &&
	git add test-file &&
	git commit -m "add file for rm test" &&
	git rm test-file > rm-output &&
	test `grep "^rm " rm-output | wc -l` = 1 &&
	rm -f test-file rm-output &&
	git commit -m "remove file from rm test"

Created commit 88ac786: add file for rm test
 2 files changed, 1 insertions(+), 1 deletions(-)
 delete mode 100644 -q
 delete mode 100644 bar
 delete mode 100644 foo
 delete mode 100644 "newline\nembedded"
 delete mode 100644 space embedded
 delete mode 100644 "tab\tembedded"
 create mode 100644 test-file
Created commit e1e2b24: remove file from rm test
 1 files changed, 0 insertions(+), 1 deletions(-)
 delete mode 100644 test-file
*   ok 18: "rm" command printed

* expecting success: 
	echo frotz > test-file &&
	git add test-file &&
	git commit -m "add file for rm --quiet test" &&
	git rm --quiet test-file > rm-output &&
	test `wc -l < rm-output` = 0 &&
	rm -f test-file rm-output &&
	git commit -m "remove file from rm --quiet test"

Created commit b3d61ac: add file for rm --quiet test
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 test-file
Created commit 74488b8: remove file from rm --quiet test
 1 files changed, 0 insertions(+), 1 deletions(-)
 delete mode 100644 test-file
*   ok 19: "rm" command suppressed with --quiet

* expecting success: 
	git add foo baz &&
	git ls-files --error-unmatch foo baz

baz
foo
*   ok 20: Re-add foo and baz

* expecting success: 
	echo >>foo &&
	! git rm foo baz &&
	test -f foo &&
	test -f baz &&
	git ls-files --error-unmatch foo baz

error: 'foo' has staged content different from both the file and the HEAD
(use -f to force removal)
baz
foo
*   ok 21: Modify foo -- rm should refuse

* expecting success: 
	git rm -f foo baz &&
	test ! -f foo &&
	test ! -f baz &&
	! git ls-files --error-unmatch foo &&
	! git ls-files --error-unmatch bar

rm 'baz'
rm 'foo'
error: pathspec 'foo' did not match any file(s) known to git.
Did you forget to 'git add'?
error: pathspec 'bar' did not match any file(s) known to git.
Did you forget to 'git add'?
*   ok 22: Modified foo -- rm -f should work

* expecting success: 
	echo frotz >foo &&
	git checkout HEAD -- baz &&
	git add foo baz &&
	git ls-files --error-unmatch foo baz

baz
foo
*   ok 23: Re-add foo and baz for HEAD tests

* expecting success: 
	! git rm foo baz &&
	test -f foo &&
	test -f baz &&
	git ls-files --error-unmatch foo baz

error: 'foo' has changes staged in the index
(use --cached to keep the file, or -f to force removal)
baz
foo
*   ok 24: foo is different in index from HEAD -- rm should refuse

* expecting success: 
	git rm -f foo baz &&
	test ! -f foo &&
	test ! -f baz &&
	! git ls-files --error-unmatch foo
	! git ls-files --error-unmatch baz

rm 'baz'
rm 'foo'
error: pathspec 'foo' did not match any file(s) known to git.
Did you forget to 'git add'?
error: pathspec 'baz' did not match any file(s) known to git.
Did you forget to 'git add'?
*   ok 25: but with -f it should work.

* expecting success: 
	mkdir -p frotz &&
	echo qfwfq >frotz/nitfol &&
	git add frotz &&
	git commit -m "subdir test"

Created commit 0ad4d41: subdir test
 1 files changed, 1 insertions(+), 0 deletions(-)
 delete mode 100644 baz
 create mode 100644 frotz/nitfol
*   ok 26: Recursive test setup

* expecting success: 
	! git rm frotz &&
	test -d frotz &&
	test -f frotz/nitfol

fatal: not removing 'frotz' recursively without -r
*   ok 27: Recursive without -r fails

* expecting success: 
	echo qfwfq >>frotz/nitfol
	! git rm -r frotz &&
	test -d frotz &&
	test -f frotz/nitfol

error: 'frotz/nitfol' has local modifications
(use --cached to keep the file, or -f to force removal)
*   ok 28: Recursive with -r but dirty

* expecting success: 
	git rm -f -r frotz &&
	! test -f frotz/nitfol &&
	! test -d frotz

rm 'frotz/nitfol'
*   ok 29: Recursive with -r -f

* expecting failure: 
	git rm nonexistent

fatal: pathspec 'nonexistent' did not match any files
*   ok 30: Remove nonexistent file returns nonzero exit status

* passed all 30 test(s)
*** t3700-add.sh ***
* expecting success: touch foo && git add foo
*   ok 1: Test of git add

* expecting success: git ls-files foo | grep foo
foo
*   ok 2: Post-check that foo is in the index

* expecting success: touch -- -q && git add -- -q
*   ok 3: Test that "git add -- -q" works

* expecting success: git config core.filemode 0 &&
	 echo foo >xfoo1 &&
	 chmod 755 xfoo1 &&
	 git add xfoo1 &&
	 case "`git ls-files --stage xfoo1`" in
	 100644" "*xfoo1) echo ok;;
	 *) echo fail; git ls-files --stage xfoo1; (exit 1);;
	 esac
ok
*   ok 4: git add: Test that executable bit is not used if core.filemode=0

* expecting success: 
	rm -f xfoo1 &&
	ln -s foo xfoo1 &&
	git add xfoo1 &&
	case "`git ls-files --stage xfoo1`" in
	120000" "*xfoo1) echo ok;;
	*) echo fail; git ls-files --stage xfoo1; (exit 1);;
	esac

ok
*   ok 5: git add: filemode=0 should not get confused by symlink

* expecting success: git config core.filemode 0 &&
	 echo foo >xfoo2 &&
	 chmod 755 xfoo2 &&
	 git update-index --add xfoo2 &&
	 case "`git ls-files --stage xfoo2`" in
	 100644" "*xfoo2) echo ok;;
	 *) echo fail; git ls-files --stage xfoo2; (exit 1);;
	 esac
ok
*   ok 6: git update-index --add: Test that executable bit is not used...

* expecting success: 
	rm -f xfoo2 &&
	ln -s foo xfoo2 &&
	git update-index --add xfoo2 &&
	case "`git ls-files --stage xfoo2`" in
	120000" "*xfoo2) echo ok;;
	*) echo fail; git ls-files --stage xfoo2; (exit 1);;
	esac

ok
*   ok 7: git add: filemode=0 should not get confused by symlink

* expecting success: git config core.filemode 0 &&
	 ln -s xfoo2 xfoo3 &&
	 git update-index --add xfoo3 &&
	 case "`git ls-files --stage xfoo3`" in
	 120000" "*xfoo3) echo ok;;
	 *) echo fail; git ls-files --stage xfoo3; (exit 1);;
	 esac
ok
*   ok 8: git update-index --add: Test that executable bit is not used...

* expecting success: 
	echo "*.ig" >.gitignore &&
	mkdir c.if d.ig &&
	>a.ig && >b.if &&
	>c.if/c.if && >c.if/c.ig &&
	>d.ig/d.if && >d.ig/d.ig

*   ok 9: .gitignore test setup

* expecting success: 
	git add . &&
	! git ls-files | grep "\.ig"

*   ok 10: .gitignore is honored

* expecting success: 
	! git add a.?? &&
	! git ls-files | grep "\.ig"

The following paths are ignored by one of your .gitignore files:
a.ig
Use -f if you really want to add them.
fatal: no files added
*   ok 11: error out when attempting to add ignored ones without -f

* expecting success: 
	! git add d.?? &&
	! git ls-files | grep "\.ig"

The following paths are ignored by one of your .gitignore files:
d.ig
Use -f if you really want to add them.
fatal: no files added
*   ok 12: error out when attempting to add ignored ones without -f

* expecting success: 
	git add -f a.?? &&
	git ls-files --error-unmatch a.ig

a.ig
*   ok 13: add ignored ones with -f

* expecting success: 
	git add -f d.??/* &&
	git ls-files --error-unmatch d.ig/d.if d.ig/d.ig

d.ig/d.if
d.ig/d.ig
*   ok 14: add ignored ones with -f

* expecting success: 
	rm -f .git/index &&
	git add -f d.?? &&
	git ls-files --error-unmatch d.ig/d.if d.ig/d.ig

d.ig/d.if
d.ig/d.ig
*   ok 15: add ignored ones with -f

* expecting success: 

	rm -f .git/index &&
	mkdir -p sub/dir &&
	echo "!dir/a.*" >sub/.gitignore &&
	>sub/a.ig &&
	>sub/dir/a.ig &&
	git add sub/dir &&
	git ls-files --error-unmatch sub/dir/a.ig &&
	rm -f .git/index &&
	(
		cd sub/dir &&
		git add .
	) &&
	git ls-files --error-unmatch sub/dir/a.ig

sub/dir/a.ig
sub/dir/a.ig
*   ok 16: .gitignore with subdirectory

* expecting success: 
	rm -f .git/index &&
	git add 1/2/a 1/3/b 1/2/c

*   ok 17: check correct prefix detection

* expecting success: 
	for s in 1 2 3
	do
		echo $s > stage$s
		echo "100755 $(git hash-object -w stage$s) $s	file"
		echo "120000 $(printf $s | git hash-object -w -t blob --stdin) $s	symlink"
	done | git update-index --index-info &&
	git config core.filemode 0 &&
	git config core.symlinks 0 &&
	echo new > file &&
	echo new > symlink &&
	git add file symlink &&
	git ls-files --stage | grep "^100755 .* 0	file$" &&
	git ls-files --stage | grep "^120000 .* 0	symlink$"

100755 3e757656cf36eca53338e520d134963a44f793f8 0	file
120000 3e757656cf36eca53338e520d134963a44f793f8 0	symlink
*   ok 18: git add with filemode=0, symlinks=0, and unmerged entries

* expecting success: 
	git rm --cached -f file symlink &&
	(
		echo "100644 $(git hash-object -w stage1) 1	file"
		echo "100755 $(git hash-object -w stage2) 2	file"
		echo "100644 $(printf 1 | git hash-object -w -t blob --stdin) 1	symlink"
		echo "120000 $(printf 2 | git hash-object -w -t blob --stdin) 2	symlink"
	) | git update-index --index-info &&
	git config core.filemode 0 &&
	git config core.symlinks 0 &&
	echo new > file &&
	echo new > symlink &&
	git add file symlink &&
	git ls-files --stage | grep "^100755 .* 0	file$" &&
	git ls-files --stage | grep "^120000 .* 0	symlink$"

rm 'file'
rm 'symlink'
100755 3e757656cf36eca53338e520d134963a44f793f8 0	file
120000 3e757656cf36eca53338e520d134963a44f793f8 0	symlink
*   ok 19: git add with filemode=0, symlinks=0 prefers stage 2 over stage 1

* expecting success: 
	>foo && git add foo && git commit -a -m "commit all" &&
	test -z "`git diff-index HEAD -- foo`" &&
	git read-tree HEAD &&
	case "`git diff-index HEAD -- foo`" in
	:100644" "*"M	foo") echo ok;;
	*) echo fail; (exit 1);;
	esac &&
	git add --refresh -- foo &&
	test -z "`git diff-index HEAD -- foo`"

Created initial commit a0c7c6e: commit all
 2 files changed, 2 insertions(+), 0 deletions(-)
 create mode 100644 1/2/a
 create mode 100644 1/2/c
 create mode 100644 1/3/b
 create mode 100755 file
 create mode 100644 foo
 create mode 120000 symlink
ok
*   ok 20: git add --refresh

* passed all 20 test(s)
*** t3800-mktag.sh ***
Created initial commit 560a488: Initial commit
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 A
* expecting success: 
		( ! git-mktag <tag.sig 2>message ) &&
		grep -q "$expect" message
	
*   ok 1: Tag object length check

* expecting success: 
		( ! git-mktag <tag.sig 2>message ) &&
		grep -q "$expect" message
	
*   ok 2: "object" line label check

* expecting success: 
		( ! git-mktag <tag.sig 2>message ) &&
		grep -q "$expect" message
	
*   ok 3: "object" line SHA1 check

* expecting success: 
		( ! git-mktag <tag.sig 2>message ) &&
		grep -q "$expect" message
	
*   ok 4: "type" line label check

* expecting success: 
		( ! git-mktag <tag.sig 2>message ) &&
		grep -q "$expect" message
	
*   ok 5: "type" line eol check

* expecting success: 
		( ! git-mktag <tag.sig 2>message ) &&
		grep -q "$expect" message
	
*   ok 6: "tag" line label check #1

* expecting success: 
		( ! git-mktag <tag.sig 2>message ) &&
		grep -q "$expect" message
	
*   ok 7: "tag" line label check #2

* expecting success: 
		( ! git-mktag <tag.sig 2>message ) &&
		grep -q "$expect" message
	
*   ok 8: "type" line type-name length check

* expecting success: 
		( ! git-mktag <tag.sig 2>message ) &&
		grep -q "$expect" message
	
*   ok 9: verify object (SHA1/type) check

* expecting success: 
		( ! git-mktag <tag.sig 2>message ) &&
		grep -q "$expect" message
	
*   ok 10: verify tag-name check

* expecting success: 
		( ! git-mktag <tag.sig 2>message ) &&
		grep -q "$expect" message
	
*   ok 11: "tagger" line label check #1

* expecting success: 
		( ! git-mktag <tag.sig 2>message ) &&
		grep -q "$expect" message
	
*   ok 12: "tagger" line label check #2

* expecting success: git-mktag <tag.sig >.git/refs/tags/mytag 2>message
*   ok 13: create valid tag

* expecting success: git-tag -l | grep mytag
mytag
*   ok 14: check mytag

* passed all 14 test(s)
*** t3900-i18n-commit.sh ***
* expecting success: 
	: >F &&
	git add F &&
	T=$(git write-tree) &&
	C=$(git commit-tree $T <../t3900/1-UTF-8.txt) &&
	git update-ref HEAD $C &&
	git-tag C0

*   ok 1: setup

* expecting success: 
	E=$(git cat-file commit C0 | sed -ne "s/^encoding //p") &&
	test z = "z$E"

*   ok 2: no encoding header for base case

* expecting success: 
		git config i18n.commitencoding $H &&
		git-checkout -b $H C0 &&
		echo $H >F &&
		git-commit -a -F ../t3900/$H.txt
	
Switched to a new branch "ISO-8859-1"
Created commit 31fe678: ÄËÑÏÖ
 1 files changed, 1 insertions(+), 0 deletions(-)
*   ok 3: ISO-8859-1 setup

* expecting success: 
		git config i18n.commitencoding $H &&
		git-checkout -b $H C0 &&
		echo $H >F &&
		git-commit -a -F ../t3900/$H.txt
	
Switched to a new branch "EUCJP"
Created commit 7f2d154: ¤Ï¤ì¤Ò¤Û¤Õ
 1 files changed, 1 insertions(+), 0 deletions(-)
*   ok 4: EUCJP setup

* expecting success: 
		git config i18n.commitencoding $H &&
		git-checkout -b $H C0 &&
		echo $H >F &&
		git-commit -a -F ../t3900/$H.txt
	
Switched to a new branch "ISO-2022-JP"
Created commit c3edcae: $B$O$l$R$[$U(B
 1 files changed, 1 insertions(+), 0 deletions(-)
*   ok 5: ISO-2022-JP setup

* expecting success: 
		E=$(git cat-file commit ISO-8859-1 | sed -ne "s/^encoding //p") &&
		test "z$E" = "zISO-8859-1"
	
*   ok 6: check encoding header for ISO-8859-1

* expecting success: 
		E=$(git cat-file commit EUCJP | sed -ne "s/^encoding //p") &&
		test "z$E" = "zEUCJP"
	
*   ok 7: check encoding header for EUCJP

* expecting success: 
		E=$(git cat-file commit ISO-2022-JP | sed -ne "s/^encoding //p") &&
		test "z$E" = "zISO-2022-JP"
	
*   ok 8: check encoding header for ISO-2022-JP

* expecting success: 
	git config --unset-all i18n.commitencoding &&
	if Z=$(git config --get-all i18n.commitencoding)
	then
		echo Oops, should have failed.
		false
	else
		test z = "z$Z"
	fi &&
	git config i18n.commitencoding utf-8

*   ok 9: config to remove customization

* expecting success: 
	compare_with ISO-8859-1 ../t3900/1-UTF-8.txt

diff --git a/current b/../t3900/1-UTF-8.txt
*   ok 10: ISO-8859-1 should be shown in UTF-8 now

* expecting success: 
		compare_with EUCJP ../t3900/2-UTF-8.txt
	
diff --git a/current b/../t3900/2-UTF-8.txt
*   ok 11: EUCJP should be shown in UTF-8 now

* expecting success: 
		compare_with ISO-2022-JP ../t3900/2-UTF-8.txt
	
diff --git a/current b/../t3900/2-UTF-8.txt
*   ok 12: ISO-2022-JP should be shown in UTF-8 now

* expecting success: 
	git config --unset-all i18n.commitencoding &&
	if Z=$(git config --get-all i18n.commitencoding)
	then
		echo Oops, should have failed.
		false
	else
		test z = "z$Z"
	fi

*   ok 13: config to add customization

* expecting success: 
		git config i18n.commitencoding ISO-8859-1 &&
		compare_with ISO-8859-1 ../t3900/ISO-8859-1.txt
	
diff --git a/current b/../t3900/ISO-8859-1.txt
*   ok 14: ISO-8859-1 should be shown in itself now

* expecting success: 
		git config i18n.commitencoding EUCJP &&
		compare_with EUCJP ../t3900/EUCJP.txt
	
diff --git a/current b/../t3900/EUCJP.txt
*   ok 15: EUCJP should be shown in itself now

* expecting success: 
		git config i18n.commitencoding ISO-2022-JP &&
		compare_with ISO-2022-JP ../t3900/ISO-2022-JP.txt
	
diff --git a/current b/../t3900/ISO-2022-JP.txt
*   ok 16: ISO-2022-JP should be shown in itself now

* expecting success: 
	git config i18n.logoutputencoding utf-8

*   ok 17: config to tweak customization

* expecting success: 
	compare_with ISO-8859-1 ../t3900/1-UTF-8.txt

diff --git a/current b/../t3900/1-UTF-8.txt
*   ok 18: ISO-8859-1 should be shown in UTF-8 now

* expecting success: 
		compare_with EUCJP ../t3900/2-UTF-8.txt
	
diff --git a/current b/../t3900/2-UTF-8.txt
*   ok 19: EUCJP should be shown in UTF-8 now

* expecting success: 
		compare_with ISO-2022-JP ../t3900/2-UTF-8.txt
	
diff --git a/current b/../t3900/2-UTF-8.txt
*   ok 20: ISO-2022-JP should be shown in UTF-8 now

* expecting success: 
			compare_with EUCJP ../t3900/EUCJP.txt
		
diff --git a/current b/../t3900/EUCJP.txt
*   ok 21: EUCJP should be shown in EUCJP now

* expecting success: 
			compare_with ISO-2022-JP ../t3900/EUCJP.txt
		
diff --git a/current b/../t3900/EUCJP.txt
*   ok 22: ISO-2022-JP should be shown in EUCJP now

* expecting success: 
			compare_with EUCJP ../t3900/ISO-2022-JP.txt
		
diff --git a/current b/../t3900/ISO-2022-JP.txt
*   ok 23: EUCJP should be shown in ISO-2022-JP now

* expecting success: 
			compare_with ISO-2022-JP ../t3900/ISO-2022-JP.txt
		
diff --git a/current b/../t3900/ISO-2022-JP.txt
*   ok 24: ISO-2022-JP should be shown in ISO-2022-JP now

* expecting success: 
		compare_with "--encoding=none ISO-8859-1" ../t3900/ISO-8859-1.txt
	
diff --git a/current b/../t3900/ISO-8859-1.txt
*   ok 25: No conversion with ISO-8859-1

* expecting success: 
		compare_with "--encoding=none EUCJP" ../t3900/EUCJP.txt
	
diff --git a/current b/../t3900/EUCJP.txt
*   ok 26: No conversion with EUCJP

* expecting success: 
		compare_with "--encoding=none ISO-2022-JP" ../t3900/ISO-2022-JP.txt
	
diff --git a/current b/../t3900/ISO-2022-JP.txt
*   ok 27: No conversion with ISO-2022-JP

* passed all 27 test(s)
*** t3901-i18n-patch.sh ***
* expecting success: 
	git config i18n.commitencoding UTF-8 &&

	# use UTF-8 in author and committer name to match the
	# i18n.commitencoding settings
	. ../t3901-utf8.txt &&

	test_tick &&
	echo "$GIT_AUTHOR_NAME" >mine &&
	git add mine &&
	git commit -s -m "Initial commit" &&

	test_tick &&
	echo Hello world >mine &&
	git add mine &&
	git commit -s -m "Second on main" &&

	# the first commit on the side branch is UTF-8
	test_tick &&
	git checkout -b side master^ &&
	echo Another file >yours &&
	git add yours &&
	git commit -s -m "Second on side" &&

	# the second one on the side branch is ISO-8859-1
	git config i18n.commitencoding ISO-8859-1 &&
	# use author and committer name in ISO-8859-1 to match it.
	. ../t3901-8859-1.txt &&
	test_tick &&
	echo Yet another >theirs &&
	git add theirs &&
	git commit -s -m "Third on side" &&

	# Back to default
	git config i18n.commitencoding UTF-8

Created initial commit a751cb4: Initial commit
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 mine
Created commit 1abbfe5: Second on main
 1 files changed, 1 insertions(+), 1 deletions(-)
Switched to a new branch "side"
Created commit 907dc52: Second on side
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 yours
Created commit dffb7b8: Third on side
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 theirs
*   ok 1: setup

* expecting success: 
	git config i18n.logoutputencoding ISO-8859-1 &&

	git format-patch --stdout master..HEAD^ >out-l1 &&
	git format-patch --stdout HEAD^ >out-l2 &&
	grep "^Content-Type: text/plain; charset=ISO-8859-1" out-l1 &&
	grep "^From: =?ISO-8859-1?q?=C1=E9=ED=20=F3=FA?=" out-l1 &&
	grep "^Content-Type: text/plain; charset=ISO-8859-1" out-l2 &&
	grep "^From: =?ISO-8859-1?q?=C1=E9=ED=20=F3=FA?=" out-l2

Content-Type: text/plain; charset=ISO-8859-1
From: =?ISO-8859-1?q?=C1=E9=ED=20=F3=FA?= <author at example.com>
Content-Type: text/plain; charset=ISO-8859-1
From: =?ISO-8859-1?q?=C1=E9=ED=20=F3=FA?= <author at example.com>
*   ok 2: format-patch output (ISO-8859-1)

* expecting success: 
	git config i18n.logoutputencoding UTF-8 &&

	git format-patch --stdout master..HEAD^ >out-u1 &&
	git format-patch --stdout HEAD^ >out-u2 &&
	grep "^Content-Type: text/plain; charset=UTF-8" out-u1 &&
	grep "^From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?=" out-u1 &&
	grep "^Content-Type: text/plain; charset=UTF-8" out-u2 &&
	grep "^From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?=" out-u2

Content-Type: text/plain; charset=UTF-8
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author at example.com>
Content-Type: text/plain; charset=UTF-8
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author at example.com>
*   ok 3: format-patch output (UTF-8)

* expecting success: 
	# We want the result of rebase in UTF-8
	git config i18n.commitencoding UTF-8 &&

	# The test is about logoutputencoding not affecting the
	# final outcome -- it is used internally to generate the
	# patch and the log.

	git config i18n.logoutputencoding UTF-8 &&

	# The result will be committed by GIT_COMMITTER_NAME --
	# we want UTF-8 encoded name.
	. ../t3901-utf8.txt &&
	git checkout -b test &&
	git-rebase master &&

	check_encoding 2

Switched to a new branch "test"
First, rewinding head to replay your work on top of it...
HEAD is now at 1abbfe5... Second on main
Applying Second on side
Applying Third on side
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author at example.com>
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author at example.com>
*   ok 4: rebase (U/U)

* expecting success: 
	git config i18n.commitencoding UTF-8 &&
	git config i18n.logoutputencoding ISO-8859-1 &&
	. ../t3901-utf8.txt &&

	git reset --hard side &&
	git-rebase master &&

	check_encoding 2

HEAD is now at dffb7b8... Third on side
First, rewinding head to replay your work on top of it...
HEAD is now at 1abbfe5... Second on main
Applying Second on side
Applying Third on side
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author at example.com>
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author at example.com>
*   ok 5: rebase (U/L)

* expecting success: 
	# In this test we want ISO-8859-1 encoded commits as the result
	git config i18n.commitencoding ISO-8859-1 &&
	git config i18n.logoutputencoding ISO-8859-1 &&
	. ../t3901-8859-1.txt &&

	git reset --hard side &&
	git-rebase master &&

	check_encoding 2 8859

HEAD is now at dffb7b8... Third on side
First, rewinding head to replay your work on top of it...
HEAD is now at 1abbfe5... Second on main
Applying Second on side
Applying Third on side
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author at example.com>
encoding ISO-8859-1
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author at example.com>
encoding ISO-8859-1
*   ok 6: rebase (L/L)

* expecting success: 
	# This is pathological -- use UTF-8 as intermediate form
	# to get ISO-8859-1 results.
	git config i18n.commitencoding ISO-8859-1 &&
	git config i18n.logoutputencoding UTF-8 &&
	. ../t3901-8859-1.txt &&

	git reset --hard side &&
	git-rebase master &&

	check_encoding 2 8859

HEAD is now at dffb7b8... Third on side
First, rewinding head to replay your work on top of it...
HEAD is now at 1abbfe5... Second on main
Applying Second on side
Applying Third on side
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author at example.com>
encoding ISO-8859-1
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author at example.com>
encoding ISO-8859-1
*   ok 7: rebase (L/U)

* expecting success: 
	# Both the commitencoding and logoutputencoding is set to UTF-8.

	git config i18n.commitencoding UTF-8 &&
	git config i18n.logoutputencoding UTF-8 &&
	. ../t3901-utf8.txt &&

	git reset --hard master &&
	git cherry-pick side^ &&
	git cherry-pick side &&
	git revert HEAD &&

	check_encoding 3

HEAD is now at 1abbfe5... Second on main
Merging HEAD with 907dc52... Second on side
Merging:
1abbfe5 Second on main
907dc52 Second on side
found 1 common ancestor(s):
a751cb4 Initial commit
Finished one cherry-pick.
Created commit 226e420: Second on side
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 yours
Merging HEAD with dffb7b8... Third on side
Merging:
226e420 Second on side
dffb7b8 Third on side
found 1 common ancestor(s):
907dc52 Second on side
Finished one cherry-pick.
Created commit 0c82aa3: Third on side
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 theirs
Merging HEAD with 0c82aa3... Third on side
Merging:
0c82aa3 Third on side
226e420 Second on side
found 1 common ancestor(s):
0c82aa3 Third on side
Removed theirs
Finished one revert.
Created commit 267f566: Revert "Third on side"
 1 files changed, 0 insertions(+), 1 deletions(-)
 delete mode 100644 theirs
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author at example.com>
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author at example.com>
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author at example.com>
*   ok 8: cherry-pick(U/U)

* expecting success: 
	# Both the commitencoding and logoutputencoding is set to ISO-8859-1

	git config i18n.commitencoding ISO-8859-1 &&
	git config i18n.logoutputencoding ISO-8859-1 &&
	. ../t3901-8859-1.txt &&

	git reset --hard master &&
	git cherry-pick side^ &&
	git cherry-pick side &&
	git revert HEAD &&

	check_encoding 3 8859

HEAD is now at 1abbfe5... Second on main
Merging HEAD with 907dc52... Second on side
Merging:
1abbfe5 Second on main
907dc52 Second on side
found 1 common ancestor(s):
a751cb4 Initial commit
Finished one cherry-pick.
Created commit 7222f6b: Second on side
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 yours
Merging HEAD with dffb7b8... Third on side
Merging:
7222f6b Second on side
dffb7b8 Third on side
found 1 common ancestor(s):
907dc52 Second on side
Finished one cherry-pick.
Created commit db3864a: Third on side
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 theirs
Merging HEAD with db3864a... Third on side
Merging:
db3864a Third on side
7222f6b Second on side
found 1 common ancestor(s):
db3864a Third on side
Removed theirs
Finished one revert.
Created commit b7febeb: Revert "Third on side"
 1 files changed, 0 insertions(+), 1 deletions(-)
 delete mode 100644 theirs
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author at example.com>
encoding ISO-8859-1
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author at example.com>
encoding ISO-8859-1
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author at example.com>
encoding ISO-8859-1
*   ok 9: cherry-pick(L/L)

* expecting success: 
	# Commitencoding is set to UTF-8 but logoutputencoding is ISO-8859-1

	git config i18n.commitencoding UTF-8 &&
	git config i18n.logoutputencoding ISO-8859-1 &&
	. ../t3901-utf8.txt &&

	git reset --hard master &&
	git cherry-pick side^ &&
	git cherry-pick side &&
	git revert HEAD &&

	check_encoding 3

HEAD is now at 1abbfe5... Second on main
Merging HEAD with 907dc52... Second on side
Merging:
1abbfe5 Second on main
907dc52 Second on side
found 1 common ancestor(s):
a751cb4 Initial commit
Finished one cherry-pick.
Created commit 226e420: Second on side
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 yours
Merging HEAD with dffb7b8... Third on side
Merging:
226e420 Second on side
dffb7b8 Third on side
found 1 common ancestor(s):
907dc52 Second on side
Finished one cherry-pick.
Created commit 0c82aa3: Third on side
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 theirs
Merging HEAD with 0c82aa3... Third on side
Merging:
0c82aa3 Third on side
226e420 Second on side
found 1 common ancestor(s):
0c82aa3 Third on side
Removed theirs
Finished one revert.
Created commit 267f566: Revert "Third on side"
 1 files changed, 0 insertions(+), 1 deletions(-)
 delete mode 100644 theirs
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author at example.com>
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author at example.com>
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author at example.com>
*   ok 10: cherry-pick(U/L)

* expecting success: 
	# Again, the commitencoding is set to ISO-8859-1 but
	# logoutputencoding is set to UTF-8.

	git config i18n.commitencoding ISO-8859-1 &&
	git config i18n.logoutputencoding UTF-8 &&
	. ../t3901-8859-1.txt &&

	git reset --hard master &&
	git cherry-pick side^ &&
	git cherry-pick side &&
	git revert HEAD &&

	check_encoding 3 8859

HEAD is now at 1abbfe5... Second on main
Merging HEAD with 907dc52... Second on side
Merging:
1abbfe5 Second on main
907dc52 Second on side
found 1 common ancestor(s):
a751cb4 Initial commit
Finished one cherry-pick.
Created commit 7222f6b: Second on side
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 yours
Merging HEAD with dffb7b8... Third on side
Merging:
7222f6b Second on side
dffb7b8 Third on side
found 1 common ancestor(s):
907dc52 Second on side
Finished one cherry-pick.
Created commit db3864a: Third on side
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 theirs
Merging HEAD with db3864a... Third on side
Merging:
db3864a Third on side
7222f6b Second on side
found 1 common ancestor(s):
db3864a Third on side
Removed theirs
Finished one revert.
Created commit b7febeb: Revert "Third on side"
 1 files changed, 0 insertions(+), 1 deletions(-)
 delete mode 100644 theirs
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author at example.com>
encoding ISO-8859-1
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author at example.com>
encoding ISO-8859-1
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author at example.com>
encoding ISO-8859-1
*   ok 11: cherry-pick(L/U)

* expecting success: 
	git config i18n.commitencoding UTF-8 &&
	git config i18n.logoutputencoding UTF-8 &&
	. ../t3901-utf8.txt &&

	git reset --hard side &&
	git-rebase --merge master &&

	check_encoding 2

HEAD is now at dffb7b8... Third on side
First, rewinding head to replay your work on top of it...
HEAD is now at 1abbfe5... Second on main
Merging master with HEAD~1
Merging:
1abbfe5 Second on main
907dc52 Second on side
found 1 common ancestor(s):
a751cb4 Initial commit
Created commit 226e420: Second on side
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 yours
Committed: 0001 Second on side
Merging master with HEAD~0
Merging:
226e420 Second on side
dffb7b8 Third on side
found 1 common ancestor(s):
907dc52 Second on side
Created commit 0c82aa3: Third on side
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 theirs
Committed: 0002 Third on side
All done.
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author at example.com>
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author at example.com>
*   ok 12: rebase --merge (U/U)

* expecting success: 
	git config i18n.commitencoding UTF-8 &&
	git config i18n.logoutputencoding ISO-8859-1 &&
	. ../t3901-utf8.txt &&

	git reset --hard side &&
	git-rebase --merge master &&

	check_encoding 2

HEAD is now at dffb7b8... Third on side
First, rewinding head to replay your work on top of it...
HEAD is now at 1abbfe5... Second on main
Merging master with HEAD~1
Merging:
1abbfe5 Second on main
907dc52 Second on side
found 1 common ancestor(s):
a751cb4 Initial commit
Created commit 226e420: Second on side
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 yours
Committed: 0001 Second on side
Merging master with HEAD~0
Merging:
226e420 Second on side
dffb7b8 Third on side
found 1 common ancestor(s):
907dc52 Second on side
Created commit 0c82aa3: Third on side
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 theirs
Committed: 0002 Third on side
All done.
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author at example.com>
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author at example.com>
*   ok 13: rebase --merge (U/L)

* expecting success: 
	# In this test we want ISO-8859-1 encoded commits as the result
	git config i18n.commitencoding ISO-8859-1 &&
	git config i18n.logoutputencoding ISO-8859-1 &&
	. ../t3901-8859-1.txt &&

	git reset --hard side &&
	git-rebase --merge master &&

	check_encoding 2 8859

HEAD is now at dffb7b8... Third on side
First, rewinding head to replay your work on top of it...
HEAD is now at 1abbfe5... Second on main
Merging master with HEAD~1
Merging:
1abbfe5 Second on main
907dc52 Second on side
found 1 common ancestor(s):
a751cb4 Initial commit
Created commit 7222f6b: Second on side
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 yours
Committed: 0001 Second on side
Merging master with HEAD~0
Merging:
7222f6b Second on side
dffb7b8 Third on side
found 1 common ancestor(s):
907dc52 Second on side
Created commit db3864a: Third on side
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 theirs
Committed: 0002 Third on side
All done.
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author at example.com>
encoding ISO-8859-1
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author at example.com>
encoding ISO-8859-1
*   ok 14: rebase --merge (L/L)

* expecting success: 
	# This is pathological -- use UTF-8 as intermediate form
	# to get ISO-8859-1 results.
	git config i18n.commitencoding ISO-8859-1 &&
	git config i18n.logoutputencoding UTF-8 &&
	. ../t3901-8859-1.txt &&

	git reset --hard side &&
	git-rebase --merge master &&

	check_encoding 2 8859

HEAD is now at dffb7b8... Third on side
First, rewinding head to replay your work on top of it...
HEAD is now at 1abbfe5... Second on main
Merging master with HEAD~1
Merging:
1abbfe5 Second on main
907dc52 Second on side
found 1 common ancestor(s):
a751cb4 Initial commit
Created commit 7222f6b: Second on side
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 yours
Committed: 0001 Second on side
Merging master with HEAD~0
Merging:
7222f6b Second on side
dffb7b8 Third on side
found 1 common ancestor(s):
907dc52 Second on side
Created commit db3864a: Third on side
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 theirs
Committed: 0002 Third on side
All done.
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author at example.com>
encoding ISO-8859-1
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author at example.com>
encoding ISO-8859-1
*   ok 15: rebase --merge (L/U)

* passed all 15 test(s)
*** t3902-quoted.sh ***
* expecting success: 

	for_each_name "echo initial >\"\$name\""
	git add . &&
	git commit -q -m Initial &&

	for_each_name "echo second >\"\$name\"" &&
	git commit -a -m Second

	for_each_name "echo modified >\"\$name\""


Created commit a4e504b: Second
 10 files changed, 10 insertions(+), 10 deletions(-)
*   ok 1: setup

* expecting success: 

	git ls-files >current && diff -u expect.quoted current


*   ok 2: check fully quoted output from ls-files

* expecting success: 

	git diff --name-only >current &&
	diff -u expect.quoted current


*   ok 3: check fully quoted output from diff-files

* expecting success: 

	git diff --name-only HEAD >current &&
	diff -u expect.quoted current


*   ok 4: check fully quoted output from diff-index

* expecting success: 

	git diff --name-only HEAD^ HEAD >current &&
	diff -u expect.quoted current


*   ok 5: check fully quoted output from diff-tree

* expecting success: 

	git config --bool core.quotepath false


*   ok 6: setting core.quotepath

* expecting success: 

	git ls-files >current && diff -u expect.raw current


*   ok 7: check fully quoted output from ls-files

* expecting success: 

	git diff --name-only >current &&
	diff -u expect.raw current


*   ok 8: check fully quoted output from diff-files

* expecting success: 

	git diff --name-only HEAD >current &&
	diff -u expect.raw current


*   ok 9: check fully quoted output from diff-index

* expecting success: 

	git diff --name-only HEAD^ HEAD >current &&
	diff -u expect.raw current


*   ok 10: check fully quoted output from diff-tree

* passed all 10 test(s)
*** t3903-stash.sh ***
* expecting success: 
	echo 1 > file &&
	git add file &&
	test_tick &&
	git commit -m initial &&
	echo 2 > file &&
	git add file &&
	echo 3 > file &&
	test_tick &&
	git stash &&
	git diff-files --quiet &&
	git diff-index --cached --quiet HEAD

Created initial commit 777c62c: initial
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 file
Saved working directory and index state "WIP on master: 777c62c... initial"
(To restore them type "git stash apply")
HEAD is now at 777c62c... initial
*   ok 1: stash some dirty working directory

* expecting success: 
	test $(git rev-parse stash^) = $(git rev-parse HEAD) &&
	git diff stash^2..stash > output &&
	diff -u output expect

*   ok 2: parents of stash

* expecting success: 
	echo 4 > other-file &&
	git add other-file &&
	echo 5 > other-file
	! git stash apply

Cannot restore on top of a dirty state
*   ok 3: apply needs clean working directory

* expecting success: 
	git add other-file &&
	test_tick &&
	git commit -m other-file &&
	git stash apply &&
	test 3 = $(cat file) &&
	test 1 = $(git show :file) &&
	test 1 = $(git show HEAD:file)

Created commit 58f2b0b: other-file
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 other-file
Merging Updated upstream with Stashed changes
Merging:
virtual Updated upstream
virtual Stashed changes
found 1 common ancestor(s):
virtual Version stash was based on
# On branch master
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#
#	modified:   file
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#	expect
#	output
no changes added to commit (use "git add" and/or "git commit -a")
*   ok 4: apply stashed changes

* expecting success: 
	git reset --hard HEAD^ &&
	echo 6 > other-file &&
	git add other-file &&
	test_tick &&
	git commit -m other-file &&
	git stash apply --index &&
	test 3 = $(cat file) &&
	test 2 = $(git show :file) &&
	test 1 = $(git show HEAD:file)

HEAD is now at 777c62c... initial
Created commit dfc6a3a: other-file
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 other-file
Merging Updated upstream with Stashed changes
Merging:
virtual Updated upstream
virtual Stashed changes
found 1 common ancestor(s):
virtual Version stash was based on
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#	modified:   file
#
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#
#	modified:   file
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#	expect
#	output
*   ok 5: apply stashed changes (including index)

* expecting success: 
	git reset --hard HEAD &&
	mkdir subdir &&
	cd subdir &&
	git stash apply

HEAD is now at dfc6a3a... other-file
Merging Updated upstream with Stashed changes
Merging:
virtual Updated upstream
virtual Stashed changes
found 1 common ancestor(s):
virtual Version stash was based on
# On branch master
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#
#	modified:   file
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#	expect
#	output
no changes added to commit (use "git add" and/or "git commit -a")
*   ok 6: unstashing in a subdirectory

* passed all 6 test(s)
*** t4000-diff-format.sh ***
* expecting success: git update-index --add path0 path1
*   ok 1: update-index --add two files with and without +x.

* expecting success: git diff-files -p >current
*   ok 2: git diff-files -p after editing work tree.

* expecting success: compare_diff_patch current expected
*   ok 3: validate git diff-files -p output.

* passed all 3 test(s)
*** t4001-diff-rename.sh ***
* expecting success: git update-index --add path0
*   ok 1: update-index --add a file.

* expecting success: tree=$(git write-tree) && echo $tree
1b20f13cbc54b85aaafd1cf0e2e74bb6c6dd01ea
*   ok 2: write that tree.

* expecting success: git update-index --add --remove path0 path1
*   ok 3: renamed and edited the file.

* expecting success: git diff-index -p -M $tree >current
*   ok 4: git diff-index -p -M after rename and editing.

* expecting success: compare_diff_patch current expected
*   ok 5: validate the output.

* expecting success: 
	cp path1 another-path &&
	git add another-path &&
	git commit -m 1 &&
	git rm path1 &&
	mkdir subdir &&
	git mv another-path subdir/path1 &&
	git status | grep "renamed: .*path1 -> subdir/path1"
Created initial commit f4c359a: 1
 2 files changed, 32 insertions(+), 0 deletions(-)
 create mode 100644 another-path
 create mode 100644 path1
rm 'path1'
#	renamed:    path1 -> subdir/path1
*   ok 6: favour same basenames over different ones

* expecting success: 
	git show HEAD:path1 | sed "s/15/16/" > subdir/path1 &&
	git status | grep "renamed: .*path1 -> subdir/path1"
#	renamed:    path1 -> subdir/path1
*   ok 7: favour same basenames even with minor differences

* passed all 7 test(s)
*** t4002-diff-basic.sh ***
* expecting success: git update-index --add $p &&
	    git update-index --add Z/$p
*   ok 1: adding test file NN and Z/NN

* expecting success: git update-index --add $p &&
	    git update-index --add Z/$p
*   ok 2: adding test file ND and Z/ND

* expecting success: git update-index --add $p &&
	    git update-index --add Z/$p
*   ok 3: adding test file NM and Z/NM

* expecting success: git update-index --add $p &&
	    git update-index --add Z/$p
*   ok 4: adding test file DN and Z/DN

* expecting success: git update-index --add $p &&
	    git update-index --add Z/$p
*   ok 5: adding test file DD and Z/DD

* expecting success: git update-index --add $p &&
	    git update-index --add Z/$p
*   ok 6: adding test file DM and Z/DM

* expecting success: git update-index --add $p &&
	    git update-index --add Z/$p
*   ok 7: adding test file MN and Z/MN

* expecting success: git update-index --add $p &&
	    git update-index --add Z/$p
*   ok 8: adding test file MD and Z/MD

* expecting success: git update-index --add $p &&
	    git update-index --add Z/$p
*   ok 9: adding test file MM and Z/MM

* expecting success: git update-index --add SS
*   ok 10: adding test file SS

* expecting success: git update-index --add TT
*   ok 11: adding test file TT

* expecting success: tree_O=$(git write-tree)
*   ok 12: prepare initial tree

* expecting success: git update-index --remove $to_remove
*   ok 13: change in branch A (removal)

* expecting success: git update-index MD
*   ok 14: change in branch A (modification)

* expecting success: git update-index MM
*   ok 15: change in branch A (modification)

* expecting success: git update-index MN
*   ok 16: change in branch A (modification)

* expecting success: git update-index Z/MD
*   ok 17: change in branch A (modification)

* expecting success: git update-index Z/MM
*   ok 18: change in branch A (modification)

* expecting success: git update-index Z/MN
*   ok 19: change in branch A (modification)

* expecting success: git update-index --add AN
*   ok 20: change in branch A (addition)

* expecting success: git update-index --add AA
*   ok 21: change in branch A (addition)

* expecting success: git update-index --add Z/AN
*   ok 22: change in branch A (addition)

* expecting success: git update-index --add Z/AA
*   ok 23: change in branch A (addition)

* expecting success: git update-index --add LL &&
     git update-index SS
*   ok 24: change in branch A (addition)

* expecting success: git update-index TT
*   ok 25: change in branch A (edit)

* expecting success: git update-index --add DF/DF
*   ok 26: change in branch A (change file to directory)

* expecting success: tree_A=$(git write-tree)
*   ok 27: recording branch A tree

* expecting success: git read-tree $tree_O &&
     git checkout-index -a
*   ok 28: reading original tree and checking out

* expecting success: git update-index --remove DD MD ND Z/DD Z/MD Z/ND
*   ok 29: change in branch B (removal)

* expecting success: git update-index DM
*   ok 30: change in branch B (modification)

* expecting success: git update-index MM
*   ok 31: change in branch B (modification)

* expecting success: git update-index NM
*   ok 32: change in branch B (modification)

* expecting success: git update-index Z/DM
*   ok 33: change in branch B (modification)

* expecting success: git update-index Z/MM
*   ok 34: change in branch B (modification)

* expecting success: git update-index Z/NM
*   ok 35: change in branch B (modification)

* expecting success: git update-index --add NA
*   ok 36: change in branch B (addition)

* expecting success: git update-index --add AA
*   ok 37: change in branch B (addition)

* expecting success: git update-index --add Z/NA
*   ok 38: change in branch B (addition)

* expecting success: git update-index --add Z/AA
*   ok 39: change in branch B (addition)

* expecting success: git update-index --add LL &&
     git update-index SS
*   ok 40: change in branch B (addition and modification)

* expecting success: git update-index TT
*   ok 41: change in branch B (modification)

* expecting success: git update-index --add DF
*   ok 42: change in branch B (addition of a file to conflict with directory)

* expecting success: tree_B=$(git write-tree)
*   ok 43: recording branch B tree

* expecting success: rm -f .git/index &&
     git read-tree $tree_O &&
     mkdir .orig-O &&
     git checkout-index --prefix=.orig-O/ -f -q -a &&
     rm -f .git/index &&
     git read-tree $tree_A &&
     mkdir .orig-A &&
     git checkout-index --prefix=.orig-A/ -f -q -a &&
     rm -f .git/index &&
     git read-tree $tree_B &&
     mkdir .orig-B &&
     git checkout-index --prefix=.orig-B/ -f -q -a
*   ok 44: keep contents of 3 trees for easy access

* expecting success: git diff-tree $tree_O $tree_A >.test-a &&
     cmp -s .test-a .test-plain-OA
*   ok 45: diff-tree of known trees.

* expecting success: git diff-tree -r $tree_O $tree_A >.test-a &&
     cmp -s .test-a .test-recursive-OA
*   ok 46: diff-tree of known trees.

* expecting success: git diff-tree $tree_O $tree_B >.test-a &&
     cmp -s .test-a .test-plain-OB
*   ok 47: diff-tree of known trees.

* expecting success: git diff-tree -r $tree_O $tree_B >.test-a &&
     cmp -s .test-a .test-recursive-OB
*   ok 48: diff-tree of known trees.

* expecting success: git diff-tree $tree_A $tree_B >.test-a &&
     cmp -s .test-a .test-plain-AB
*   ok 49: diff-tree of known trees.

* expecting success: git diff-tree -r $tree_A $tree_B >.test-a &&
     cmp -s .test-a .test-recursive-AB
*   ok 50: diff-tree of known trees.

* expecting success: git read-tree $tree_A &&
     git diff-index --cached $tree_O >.test-a &&
     cmp -s .test-a .test-recursive-OA
*   ok 51: diff-cache O with A in cache

* expecting success: git read-tree $tree_B &&
     git diff-index --cached $tree_O >.test-a &&
     cmp -s .test-a .test-recursive-OB
*   ok 52: diff-cache O with B in cache

* expecting success: git read-tree $tree_B &&
     git diff-index --cached $tree_A >.test-a &&
     cmp -s .test-a .test-recursive-AB
*   ok 53: diff-cache A with B in cache

* expecting success: rm -fr Z [A-Z][A-Z] &&
     git read-tree $tree_A &&
     git checkout-index -f -a &&
     git read-tree --reset $tree_O || return 1
     git update-index --refresh >/dev/null ;# this can exit non-zero
     git diff-files >.test-a &&
     cmp_diff_files_output .test-a .test-recursive-OA
*   ok 54: diff-files with O in cache and A checked out

* expecting success: rm -fr Z [A-Z][A-Z] &&
     git read-tree $tree_B &&
     git checkout-index -f -a &&
     git read-tree --reset $tree_O || return 1
     git update-index --refresh >/dev/null ;# this can exit non-zero
     git diff-files >.test-a &&
     cmp_diff_files_output .test-a .test-recursive-OB
*   ok 55: diff-files with O in cache and B checked out

* expecting success: rm -fr Z [A-Z][A-Z] &&
     git read-tree $tree_B &&
     git checkout-index -f -a &&
     git read-tree --reset $tree_A || return 1
     git update-index --refresh >/dev/null ;# this can exit non-zero
     git diff-files >.test-a &&
     cmp_diff_files_output .test-a .test-recursive-AB
*   ok 56: diff-files with A in cache and B checked out

* expecting success: git diff-tree $tree_O $tree_A >.test-a &&
    git diff-tree -R $tree_A $tree_O >.test-b &&
    cmp -s .test-a .test-b
*   ok 57: diff-tree O A == diff-tree -R A O

* expecting success: git diff-tree -r $tree_O $tree_A >.test-a &&
    git diff-tree -r -R $tree_A $tree_O >.test-b &&
    cmp -s .test-a .test-b
*   ok 58: diff-tree -r O A == diff-tree -r -R A O

* expecting success: git diff-tree $tree_B $tree_A >.test-a &&
    git diff-tree -R $tree_A $tree_B >.test-b &&
    cmp -s .test-a .test-b
*   ok 59: diff-tree B A == diff-tree -R A B

* expecting success: git diff-tree -r $tree_B $tree_A >.test-a &&
    git diff-tree -r -R $tree_A $tree_B >.test-b &&
    cmp -s .test-a .test-b
*   ok 60: diff-tree -r B A == diff-tree -r -R A B

* passed all 60 test(s)
*** t4003-diff-rename-1.sh ***
* expecting success: cat ../../COPYING >COPYING &&
     echo frotz >rezrov &&
    git update-index --add COPYING rezrov &&
    tree=$(git write-tree) &&
    echo $tree
6fb637967044b5d0edaa623ea9befe44d6843c70
*   ok 1: prepare reference tree

* expecting success: sed -e s/HOWEVER/However/ <COPYING >COPYING.1 &&
    sed -e s/GPL/G.P.L/g <COPYING >COPYING.2 &&
    rm -f COPYING &&
    git update-index --add --remove COPYING COPYING.?
*   ok 2: prepare work tree

* expecting success: compare_diff_patch current expected
*   ok 3: validate output from rename/copy detection (#1)

* expecting success: mv COPYING.2 COPYING &&
     git update-index --add --remove COPYING COPYING.1 COPYING.2
*   ok 4: prepare work tree again

* expecting success: compare_diff_patch current expected
*   ok 5: validate output from rename/copy detection (#2)

* expecting success: cat ../../COPYING >COPYING &&
     git update-index --add --remove COPYING COPYING.1
*   ok 6: prepare work tree once again

* expecting success: compare_diff_patch current expected
*   ok 7: validate output from rename/copy detection (#3)

* passed all 7 test(s)
*** t4004-diff-rename-symlink.sh ***
* expecting success: echo xyzzy | tr -d \012 >yomin &&
     ln -s xyzzy frotz &&
    git update-index --add frotz yomin &&
    tree=$(git write-tree) &&
    echo $tree
e8a7292168115b2c189b56bd500aa179ca8d69ba
*   ok 1: prepare reference tree

* expecting success: mv frotz rezrov &&
     rm -f yomin &&
     ln -s xyzzy nitfol &&
     ln -s xzzzy bozbar &&
    git update-index --add --remove frotz rezrov nitfol bozbar yomin
*   ok 2: prepare work tree

* expecting success: compare_diff_patch current expected
*   ok 3: validate diff output

* passed all 3 test(s)
*** t4005-diff-rename-2.sh ***
* expecting success: cat ../../COPYING >COPYING &&
     echo frotz >rezrov &&
    git update-index --add COPYING rezrov &&
    tree=$(git write-tree) &&
    echo $tree
6fb637967044b5d0edaa623ea9befe44d6843c70
*   ok 1: prepare reference tree

* expecting success: sed -e s/HOWEVER/However/ <COPYING >COPYING.1 &&
    sed -e s/GPL/G.P.L/g <COPYING >COPYING.2 &&
    rm -f COPYING &&
    git update-index --add --remove COPYING COPYING.?
*   ok 2: prepare work tree

* expecting success: compare_diff_raw current expected
*   ok 3: validate output from rename/copy detection (#1)

* expecting success: mv COPYING.2 COPYING &&
     git update-index --add --remove COPYING COPYING.1 COPYING.2
*   ok 4: prepare work tree again

* expecting success: compare_diff_raw current expected
*   ok 5: validate output from rename/copy detection (#2)

* expecting success: cat ../../COPYING >COPYING &&
     git update-index --add --remove COPYING COPYING.1
*   ok 6: prepare work tree once again

* expecting success: compare_diff_raw current expected
*   ok 7: validate output from rename/copy detection (#3)

* passed all 7 test(s)
*** t4006-diff-mode.sh ***
* expecting success: echo frotz >rezrov &&
     git update-index --add rezrov &&
     tree=`git write-tree` &&
     echo $tree
5189e2f1ba2c164fa2006e4f8f4e4ec56f15291e
*   ok 1: setup

* expecting success: chmod +x rezrov &&
	     git update-index rezrov &&
	     git diff-index $tree >current
*   ok 2: chmod

* expecting success: git diff expected check
*   ok 3: verify

* passed all 3 test(s)
*** t4007-rename-3.sh ***
* expecting success: mkdir path0 path1 &&
     cp ../../COPYING path0/COPYING &&
     git update-index --add path0/COPYING &&
    tree=$(git write-tree) &&
    echo $tree
4be42c354151eb32b60e6ab9d4cf0e5e1eda3bc3
*   ok 1: prepare reference tree

* expecting success: cp path0/COPYING path1/COPYING &&
     git update-index --add --remove path0/COPYING path1/COPYING
*   ok 2: prepare work tree

* expecting success: compare_diff_raw current expected
*   ok 3: validate the result (#1)

* expecting success: compare_diff_raw current expected
*   ok 4: validate the result (#2)

* expecting success: rm -f path0/COPYING &&
     git update-index --remove path0/COPYING
*   ok 5: tweak work tree

* expecting success: compare_diff_raw current expected
*   ok 6: validate the result (#3)

* expecting success: compare_diff_raw current expected
*   ok 7: validate the result (#4)

* passed all 7 test(s)
*** t4008-diff-break-rewrite.sh ***
* expecting success: cat ../../README >file0 &&
     cat ../../COPYING >file1 &&
    git update-index --add file0 file1 &&
    tree=$(git write-tree) &&
    echo "$tree"
fe6ec826742d10ac4345f66759a19c6cc0f03b24
*   ok 1: setup

* expecting success: sed -e "s/git/GIT/" file0 >file1 &&
     rm -f file0 &&
    git update-index --remove file0 file1
*   ok 2: change file1 with copy-edit of file0 and remove file0

* expecting success: git diff-index -B --cached "$tree" >current
*   ok 3: run diff with -B

* expecting success: compare_diff_raw expected current
*   ok 4: validate result of -B (#1)

* expecting success: git diff-index -B -M "$tree" >current
*   ok 5: run diff with -B and -M

* expecting success: compare_diff_raw expected current
*   ok 6: validate result of -B -M (#2)

* expecting success: rm -f file0 file1 &&
     git read-tree -m $tree &&
     git checkout-index -f -u -a &&
     mv file0 tmp &&
     mv file1 file0 &&
     mv tmp file1 &&
     git update-index file0 file1
*   ok 7: swap file0 and file1

* expecting success: git diff-index -B "$tree" >current
*   ok 8: run diff with -B

* expecting success: compare_diff_raw expected current
*   ok 9: validate result of -B (#3)

* expecting success: git diff-index -B -M "$tree" >current
*   ok 10: run diff with -B and -M

* expecting success: compare_diff_raw expected current
*   ok 11: validate result of -B -M (#4)

* expecting success: rm -f file0 &&
     ln -s frotz file0 &&
     git update-index file0 file1
*   ok 12: make file0 into something completely different

* expecting success: git diff-index -B "$tree" >current
*   ok 13: run diff with -B

* expecting success: compare_diff_raw expected current
*   ok 14: validate result of -B (#5)

* expecting success: git diff-index -B -M "$tree" >current
*   ok 15: run diff with -B -M

* expecting success: compare_diff_raw expected current
*   ok 16: validate result of -B -M (#6)

* expecting success: git diff-index -M "$tree" >current
*   ok 17: run diff with -M

* expecting success: compare_diff_raw expected current
*   ok 18: validate result of -M (#7)

* expecting success: rm -f file0 file1 &&
     git read-tree -m $tree &&
     git checkout-index -f -u -a &&
     sed -e "s/git/GIT/" file0 >file1 &&
     sed -e "s/git/GET/" file0 >file2 &&
     rm -f file0
     git update-index --add --remove file0 file1 file2
*   ok 19: file1 edited to look like file0 and file0 rename-edited to file2

* expecting success: git diff-index -B "$tree" >current
*   ok 20: run diff with -B

* expecting success: compare_diff_raw expected current
*   ok 21: validate result of -B (#8)

* expecting success: git diff-index -B -M "$tree" >current
*   ok 22: run diff with -B -M

* expecting success: compare_diff_raw expected current
*   ok 23: validate result of -B -M (#9)

* passed all 23 test(s)
*** t4009-diff-rename-4.sh ***
* expecting success: cat ../../COPYING >COPYING &&
     echo frotz >rezrov &&
    git update-index --add COPYING rezrov &&
    tree=$(git write-tree) &&
    echo $tree
6fb637967044b5d0edaa623ea9befe44d6843c70
*   ok 1: prepare reference tree

* expecting success: sed -e s/HOWEVER/However/ <COPYING >COPYING.1 &&
    sed -e s/GPL/G.P.L/g <COPYING >COPYING.2 &&
    rm -f COPYING &&
    git update-index --add --remove COPYING COPYING.?
*   ok 2: prepare work tree

* expecting success: compare_diff_raw_z current expected
*   ok 3: validate output from rename/copy detection (#1)

* expecting success: mv COPYING.2 COPYING &&
     git update-index --add --remove COPYING COPYING.1 COPYING.2
*   ok 4: prepare work tree again

* expecting success: compare_diff_raw_z current expected
*   ok 5: validate output from rename/copy detection (#2)

* expecting success: cat ../../COPYING >COPYING &&
     git update-index --add --remove COPYING COPYING.1
*   ok 6: prepare work tree once again

* expecting success: compare_diff_raw_z current expected
*   ok 7: validate output from rename/copy detection (#3)

* passed all 7 test(s)
*** t4010-diff-pathspec.sh ***
* expecting success: echo frotz >file0 &&
     mkdir path1 &&
     echo rezrov >path1/file1 &&
     git update-index --add file0 path1/file1 &&
     tree=`git write-tree` &&
     echo "$tree" &&
     echo nitfol >file0 &&
     echo yomin >path1/file1 &&
     git update-index file0 path1/file1
6b4658eda9b6c5385f027bc54abf3276b6effd05
*   ok 1: setup

* expecting success: git diff-index --cached $tree -- path >current &&
     compare_diff_raw current expected
*   ok 2: limit to path should show nothing

* expecting success: git diff-index --cached $tree -- path1 >current &&
     compare_diff_raw current expected
*   ok 3: limit to path1 should show path1/file1

* expecting success: git diff-index --cached $tree -- path1/ >current &&
     compare_diff_raw current expected
*   ok 4: limit to path1/ should show path1/file1

* expecting success: git diff-index --cached $tree -- file0 >current &&
     compare_diff_raw current expected
*   ok 5: limit to file0 should show file0

* expecting success: git diff-index --cached $tree -- file0/ >current &&
     compare_diff_raw current expected
*   ok 6: limit to file0/ should emit nothing.

* passed all 6 test(s)
*** t4011-diff-symlink.sh ***
* expecting success: ln -s xyzzy frotz &&
    git update-index &&
    tree=$(git write-tree) &&
    git update-index --add frotz &&
    GIT_DIFF_OPTS=--unified=0 git diff-index -M -p $tree > current &&
    compare_diff_patch current expected
*   ok 1: diff new symlink

* expecting success: tree=$(git write-tree) &&
    git update-index frotz &&
    test -z "$(git diff-index --name-only $tree)"
*   ok 2: diff unchanged symlink

* expecting success: rm frotz &&
    git diff-index -M -p $tree > current &&
    compare_diff_patch current expected
*   ok 3: diff removed symlink

* expecting success: sleep 3 &&
    ln -s xyzzy frotz &&
    git diff-index -M -p $tree > current &&
    compare_diff_patch current expected
*   ok 4: diff identical, but newly created symlink

* expecting success: rm frotz &&
    ln -s yxyyz frotz &&
    git diff-index -M -p $tree > current &&
    compare_diff_patch current expected
*   ok 5: diff different symlink

* passed all 5 test(s)
*** t4012-diff-binary.sh ***
* expecting success: echo AIT >a && echo BIT >b && echo CIT >c && echo DIT >d &&
	 git update-index --add a b c d &&
	 echo git >a &&
	 cat ../test4012.png >b &&
	 echo git >c &&
	 cat b b >d
*   ok 1: prepare repository

* expecting success: git diff | git apply --stat --summary >current &&
	 cmp current expected
*   ok 2: diff without --binary

* expecting success: git diff --binary | git apply --stat --summary >current &&
	 cmp current expected
*   ok 3: diff with --binary

* expecting success: git diff | sed -e s/-CIT/xCIT/ >broken &&
	 if git apply --stat --summary broken 2>detected
	 then
		echo unhappy - should have detected an error
		(exit 1)
	 else
		echo happy
	 fi &&
	 detected=`cat detected` &&
	 detected=`expr "$detected" : "fatal.*at line \([0-9]*\)\$"` &&
	 detected=`sed -ne "${detected}p" broken` &&
	 test "$detected" = xCIT
happy
*   ok 4: apply detecting corrupt patch correctly

* expecting success: git diff --binary | sed -e s/-CIT/xCIT/ >broken &&
	 if git apply --stat --summary broken 2>detected
	 then
		echo unhappy - should have detected an error
		(exit 1)
	 else
		echo happy
	 fi &&
	 detected=`cat detected` &&
	 detected=`expr "$detected" : "fatal.*at line \([0-9]*\)\$"` &&
	 detected=`sed -ne "${detected}p" broken` &&
	 test "$detected" = xCIT
happy
*   ok 5: apply detecting corrupt patch correctly

* expecting success: git-commit -a -m initial
Created initial commit bc23f7a: initial
 4 files changed, 2 insertions(+), 0 deletions(-)
 create mode 100644 a
 create mode 100644 b
 create mode 100644 c
 create mode 100644 d
*   ok 6: initial commit

* expecting success: echo AIT >a && mv b e && echo CIT >c && cat e >d &&
	 git update-index --add --remove a b c d e &&
	 tree0=`git write-tree` &&
	 git diff --cached --binary >current &&
	 git apply --stat --summary current
 a |    2 +-
 b |  Bin
 c |    2 +-
 d |  Bin
 e |  Bin
 5 files changed, 2 insertions(+), 2 deletions(-)
 delete mode 100644 b
 create mode 100644 e
*   ok 7: diff-index with --binary

* expecting success: git-reset --hard &&
	 git apply --binary --index <current &&
	 tree1=`git write-tree` &&
	 test "$tree1" = "$tree0"
HEAD is now at bc23f7a... initial
*   ok 8: apply binary patch

* passed all 8 test(s)
*** t4013-diff-various.sh ***
* expecting success: 

	GIT_AUTHOR_DATE="2006-06-26 00:00:00 +0000" &&
	GIT_COMMITTER_DATE="2006-06-26 00:00:00 +0000" &&
	export GIT_AUTHOR_DATE GIT_COMMITTER_DATE &&

	mkdir dir &&
	mkdir dir2 &&
	for i in 1 2 3; do echo $i; done >file0 &&
	for i in A B; do echo $i; done >dir/sub &&
	cat file0 >file2 &&
	git add file0 file2 dir/sub &&
	git commit -m Initial &&

	git branch initial &&
	git branch side &&

	GIT_AUTHOR_DATE="2006-06-26 00:01:00 +0000" &&
	GIT_COMMITTER_DATE="2006-06-26 00:01:00 +0000" &&
	export GIT_AUTHOR_DATE GIT_COMMITTER_DATE &&

	for i in 4 5 6; do echo $i; done >>file0 &&
	for i in C D; do echo $i; done >>dir/sub &&
	rm -f file2 &&
	git update-index --remove file0 file2 dir/sub &&
	git commit -m "Second${LF}${LF}This is the second commit." &&

	GIT_AUTHOR_DATE="2006-06-26 00:02:00 +0000" &&
	GIT_COMMITTER_DATE="2006-06-26 00:02:00 +0000" &&
	export GIT_AUTHOR_DATE GIT_COMMITTER_DATE &&

	for i in A B C; do echo $i; done >file1 &&
	git add file1 &&
	for i in E F; do echo $i; done >>dir/sub &&
	git update-index dir/sub &&
	git commit -m Third &&

	GIT_AUTHOR_DATE="2006-06-26 00:03:00 +0000" &&
	GIT_COMMITTER_DATE="2006-06-26 00:03:00 +0000" &&
	export GIT_AUTHOR_DATE GIT_COMMITTER_DATE &&

	git checkout side &&
	for i in A B C; do echo $i; done >>file0 &&
	for i in 1 2; do echo $i; done >>dir/sub &&
	cat dir/sub >file3 &&
	git add file3 &&
	git update-index file0 dir/sub &&
	git commit -m Side &&

	GIT_AUTHOR_DATE="2006-06-26 00:04:00 +0000" &&
	GIT_COMMITTER_DATE="2006-06-26 00:04:00 +0000" &&
	export GIT_AUTHOR_DATE GIT_COMMITTER_DATE &&

	git checkout master &&
	git pull -s ours . side &&

	GIT_AUTHOR_DATE="2006-06-26 00:05:00 +0000" &&
	GIT_COMMITTER_DATE="2006-06-26 00:05:00 +0000" &&
	export GIT_AUTHOR_DATE GIT_COMMITTER_DATE &&

	for i in A B C; do echo $i; done >>file0 &&
	for i in 1 2; do echo $i; done >>dir/sub &&
	git update-index file0 dir/sub &&

	git config log.showroot false &&
	git commit --amend &&
	git show-branch

Created initial commit 444ac55: Initial
 3 files changed, 8 insertions(+), 0 deletions(-)
 create mode 100644 dir/sub
 create mode 100644 file0
 create mode 100644 file2
Created commit 1bde4ae: Second
 3 files changed, 5 insertions(+), 3 deletions(-)
 delete mode 100644 file2
Created commit 9a6d494: Third
 2 files changed, 5 insertions(+), 0 deletions(-)
 create mode 100644 file1
Switched to branch "side"
Created commit c7a2ab9: Side
 3 files changed, 9 insertions(+), 0 deletions(-)
 create mode 100644 file3
Switched to branch "master"
Merge made by ours.
Created commit 59d314a: Merge branch 'side'
! [initial] Initial
 * [master] Merge branch 'side'
  ! [side] Side
---
 -  [master] Merge branch 'side'
 *+ [side] Side
 *  [master^] Third
 *  [master~2] Second
+*+ [initial] Initial
*   ok 1: setup

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_initial b/0002-diff.diff-tree_initial
*   ok 2: git diff-tree initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_-r_initial b/0003-diff.diff-tree_-r_initial
*   ok 3: git diff-tree -r initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_-r_--abbrev_initial b/0004-diff.diff-tree_-r_--abbrev_initial
*   ok 4: git diff-tree -r --abbrev initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_-r_--abbrev=4_initial b/0005-diff.diff-tree_-r_--abbrev=4_initial
*   ok 5: git diff-tree -r --abbrev=4 initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--root_initial b/0006-diff.diff-tree_--root_initial
*   ok 6: git diff-tree --root initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--root_--abbrev_initial b/0007-diff.diff-tree_--root_--abbrev_initial
*   ok 7: git diff-tree --root --abbrev initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--root_-r_initial b/0008-diff.diff-tree_--root_-r_initial
*   ok 8: git diff-tree --root -r initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--root_-r_--abbrev_initial b/0009-diff.diff-tree_--root_-r_--abbrev_initial
*   ok 9: git diff-tree --root -r --abbrev initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--root_-r_--abbrev=4_initial b/0010-diff.diff-tree_--root_-r_--abbrev=4_initial
*   ok 10: git diff-tree --root -r --abbrev=4 initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_-p_initial b/0011-diff.diff-tree_-p_initial
*   ok 11: git diff-tree -p initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--root_-p_initial b/0012-diff.diff-tree_--root_-p_initial
*   ok 12: git diff-tree --root -p initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--patch-with-stat_initial b/0013-diff.diff-tree_--patch-with-stat_initial
*   ok 13: git diff-tree --patch-with-stat initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--root_--patch-with-stat_initial b/0014-diff.diff-tree_--root_--patch-with-stat_initial
*   ok 14: git diff-tree --root --patch-with-stat initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--patch-with-raw_initial b/0015-diff.diff-tree_--patch-with-raw_initial
*   ok 15: git diff-tree --patch-with-raw initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--root_--patch-with-raw_initial b/0016-diff.diff-tree_--root_--patch-with-raw_initial
*   ok 16: git diff-tree --root --patch-with-raw initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--pretty_initial b/0017-diff.diff-tree_--pretty_initial
*   ok 17: git diff-tree --pretty initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--pretty_--root_initial b/0018-diff.diff-tree_--pretty_--root_initial
*   ok 18: git diff-tree --pretty --root initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--pretty_-p_initial b/0019-diff.diff-tree_--pretty_-p_initial
*   ok 19: git diff-tree --pretty -p initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--pretty_--stat_initial b/0020-diff.diff-tree_--pretty_--stat_initial
*   ok 20: git diff-tree --pretty --stat initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--pretty_--summary_initial b/0021-diff.diff-tree_--pretty_--summary_initial
*   ok 21: git diff-tree --pretty --summary initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--pretty_--stat_--summary_initial b/0022-diff.diff-tree_--pretty_--stat_--summary_initial
*   ok 22: git diff-tree --pretty --stat --summary initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--pretty_--root_-p_initial b/0023-diff.diff-tree_--pretty_--root_-p_initial
*   ok 23: git diff-tree --pretty --root -p initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--pretty_--root_--stat_initial b/0024-diff.diff-tree_--pretty_--root_--stat_initial
*   ok 24: git diff-tree --pretty --root --stat initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--pretty_--root_--summary_initial b/0025-diff.diff-tree_--pretty_--root_--summary_initial
*   ok 25: git diff-tree --pretty --root --summary initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--pretty_--root_--summary_-r_initial b/0026-diff.diff-tree_--pretty_--root_--summary_-r_initial
*   ok 26: git diff-tree --pretty --root --summary -r initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--pretty_--root_--stat_--summary_initial b/0027-diff.diff-tree_--pretty_--root_--stat_--summary_initial
*   ok 27: git diff-tree --pretty --root --stat --summary initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--pretty_--patch-with-stat_initial b/0028-diff.diff-tree_--pretty_--patch-with-stat_initial
*   ok 28: git diff-tree --pretty --patch-with-stat initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--pretty_--root_--patch-with-stat_initial b/0029-diff.diff-tree_--pretty_--root_--patch-with-stat_initial
*   ok 29: git diff-tree --pretty --root --patch-with-stat initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--pretty_--patch-with-raw_initial b/0030-diff.diff-tree_--pretty_--patch-with-raw_initial
*   ok 30: git diff-tree --pretty --patch-with-raw initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--pretty_--root_--patch-with-raw_initial b/0031-diff.diff-tree_--pretty_--root_--patch-with-raw_initial
*   ok 31: git diff-tree --pretty --root --patch-with-raw initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--pretty=oneline_initial b/0032-diff.diff-tree_--pretty=oneline_initial
*   ok 32: git diff-tree --pretty=oneline initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--pretty=oneline_--root_initial b/0033-diff.diff-tree_--pretty=oneline_--root_initial
*   ok 33: git diff-tree --pretty=oneline --root initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--pretty=oneline_-p_initial b/0034-diff.diff-tree_--pretty=oneline_-p_initial
*   ok 34: git diff-tree --pretty=oneline -p initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--pretty=oneline_--root_-p_initial b/0035-diff.diff-tree_--pretty=oneline_--root_-p_initial
*   ok 35: git diff-tree --pretty=oneline --root -p initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--pretty=oneline_--patch-with-stat_initial b/0036-diff.diff-tree_--pretty=oneline_--patch-with-stat_initial
*   ok 36: git diff-tree --pretty=oneline --patch-with-stat initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--pretty=oneline_--root_--patch-with-stat_initial b/0037-diff.diff-tree_--pretty=oneline_--root_--patch-with-stat_initial
*   ok 37: git diff-tree --pretty=oneline --root --patch-with-stat initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--pretty=oneline_--patch-with-raw_initial b/0038-diff.diff-tree_--pretty=oneline_--patch-with-raw_initial
*   ok 38: git diff-tree --pretty=oneline --patch-with-raw initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--pretty=oneline_--root_--patch-with-raw_initial b/0039-diff.diff-tree_--pretty=oneline_--root_--patch-with-raw_initial
*   ok 39: git diff-tree --pretty=oneline --root --patch-with-raw initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--pretty_side b/0040-diff.diff-tree_--pretty_side
*   ok 40: git diff-tree --pretty side

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--pretty_-p_side b/0041-diff.diff-tree_--pretty_-p_side
*   ok 41: git diff-tree --pretty -p side

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--pretty_--patch-with-stat_side b/0042-diff.diff-tree_--pretty_--patch-with-stat_side
*   ok 42: git diff-tree --pretty --patch-with-stat side

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_master b/0043-diff.diff-tree_master
*   ok 43: git diff-tree master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_-p_master b/0044-diff.diff-tree_-p_master
*   ok 44: git diff-tree -p master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_-p_-m_master b/0045-diff.diff-tree_-p_-m_master
*   ok 45: git diff-tree -p -m master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_-c_master b/0046-diff.diff-tree_-c_master
*   ok 46: git diff-tree -c master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_-c_--abbrev_master b/0047-diff.diff-tree_-c_--abbrev_master
*   ok 47: git diff-tree -c --abbrev master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--cc_master b/0048-diff.diff-tree_--cc_master
*   ok 48: git diff-tree --cc master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_-c_--stat_master b/0049-diff.diff-tree_-c_--stat_master
*   ok 49: git diff-tree -c --stat master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--cc_--stat_master b/0050-diff.diff-tree_--cc_--stat_master
*   ok 50: git diff-tree --cc --stat master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_-c_--stat_--summary_master b/0051-diff.diff-tree_-c_--stat_--summary_master
*   ok 51: git diff-tree -c --stat --summary master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--cc_--stat_--summary_master b/0052-diff.diff-tree_--cc_--stat_--summary_master
*   ok 52: git diff-tree --cc --stat --summary master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_-c_--stat_--summary_side b/0053-diff.diff-tree_-c_--stat_--summary_side
*   ok 53: git diff-tree -c --stat --summary side

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--cc_--stat_--summary_side b/0054-diff.diff-tree_--cc_--stat_--summary_side
*   ok 54: git diff-tree --cc --stat --summary side

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--cc_--patch-with-stat_master b/0055-diff.diff-tree_--cc_--patch-with-stat_master
*   ok 55: git diff-tree --cc --patch-with-stat master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_master b/0056-diff.diff-tree_--cc_--patch-with-stat_--summary_master
*   ok 56: git diff-tree --cc --patch-with-stat --summary master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff-tree_--cc_--patch-with-stat_--summary_side b/0057-diff.diff-tree_--cc_--patch-with-stat_--summary_side
*   ok 57: git diff-tree --cc --patch-with-stat --summary side

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.log_master b/0058-diff.log_master
*   ok 58: git log master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.log_-p_master b/0059-diff.log_-p_master
*   ok 59: git log -p master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.log_--root_master b/0060-diff.log_--root_master
*   ok 60: git log --root master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.log_--root_-p_master b/0061-diff.log_--root_-p_master
*   ok 61: git log --root -p master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.log_--patch-with-stat_master b/0062-diff.log_--patch-with-stat_master
*   ok 62: git log --patch-with-stat master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.log_--root_--patch-with-stat_master b/0063-diff.log_--root_--patch-with-stat_master
*   ok 63: git log --root --patch-with-stat master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.log_--root_--patch-with-stat_--summary_master b/0064-diff.log_--root_--patch-with-stat_--summary_master
*   ok 64: git log --root --patch-with-stat --summary master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.log_--root_-c_--patch-with-stat_--summary_master b/0065-diff.log_--root_-c_--patch-with-stat_--summary_master
*   ok 65: git log --root -c --patch-with-stat --summary master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.log_--root_--cc_--patch-with-stat_--summary_master b/0066-diff.log_--root_--cc_--patch-with-stat_--summary_master
*   ok 66: git log --root --cc --patch-with-stat --summary master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.log_-SF_master b/0067-diff.log_-SF_master
*   ok 67: git log -SF master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.log_-SF_-p_master b/0068-diff.log_-SF_-p_master
*   ok 68: git log -SF -p master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.whatchanged_master b/0069-diff.whatchanged_master
*   ok 69: git whatchanged master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.whatchanged_-p_master b/0070-diff.whatchanged_-p_master
*   ok 70: git whatchanged -p master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.whatchanged_--root_master b/0071-diff.whatchanged_--root_master
*   ok 71: git whatchanged --root master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.whatchanged_--root_-p_master b/0072-diff.whatchanged_--root_-p_master
*   ok 72: git whatchanged --root -p master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.whatchanged_--patch-with-stat_master b/0073-diff.whatchanged_--patch-with-stat_master
*   ok 73: git whatchanged --patch-with-stat master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.whatchanged_--root_--patch-with-stat_master b/0074-diff.whatchanged_--root_--patch-with-stat_master
*   ok 74: git whatchanged --root --patch-with-stat master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.whatchanged_--root_--patch-with-stat_--summary_master b/0075-diff.whatchanged_--root_--patch-with-stat_--summary_master
*   ok 75: git whatchanged --root --patch-with-stat --summary master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_master b/0076-diff.whatchanged_--root_-c_--patch-with-stat_--summary_master
*   ok 76: git whatchanged --root -c --patch-with-stat --summary master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master b/0077-diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master
*   ok 77: git whatchanged --root --cc --patch-with-stat --summary master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.whatchanged_-SF_master b/0078-diff.whatchanged_-SF_master
*   ok 78: git whatchanged -SF master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.whatchanged_-SF_-p_master b/0079-diff.whatchanged_-SF_-p_master
*   ok 79: git whatchanged -SF -p master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.log_--patch-with-stat_master_--_dir_ b/0080-diff.log_--patch-with-stat_master_--_dir_
*   ok 80: git log --patch-with-stat master -- dir/

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.whatchanged_--patch-with-stat_master_--_dir_ b/0081-diff.whatchanged_--patch-with-stat_master_--_dir_
*   ok 81: git whatchanged --patch-with-stat master -- dir/

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.log_--patch-with-stat_--summary_master_--_dir_ b/0082-diff.log_--patch-with-stat_--summary_master_--_dir_
*   ok 82: git log --patch-with-stat --summary master -- dir/

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.whatchanged_--patch-with-stat_--summary_master_--_dir_ b/0083-diff.whatchanged_--patch-with-stat_--summary_master_--_dir_
*   ok 83: git whatchanged --patch-with-stat --summary master -- dir/

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.show_initial b/0084-diff.show_initial
*   ok 84: git show initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.show_--root_initial b/0085-diff.show_--root_initial
*   ok 85: git show --root initial

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.show_side b/0086-diff.show_side
*   ok 86: git show side

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.show_master b/0087-diff.show_master
*   ok 87: git show master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.show_--stat_side b/0088-diff.show_--stat_side
*   ok 88: git show --stat side

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.show_--stat_--summary_side b/0089-diff.show_--stat_--summary_side
*   ok 89: git show --stat --summary side

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.show_--patch-with-stat_side b/0090-diff.show_--patch-with-stat_side
*   ok 90: git show --patch-with-stat side

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.show_--patch-with-raw_side b/0091-diff.show_--patch-with-raw_side
*   ok 91: git show --patch-with-raw side

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.show_--patch-with-stat_--summary_side b/0092-diff.show_--patch-with-stat_--summary_side
*   ok 92: git show --patch-with-stat --summary side

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.format-patch_--stdout_initial..side b/0093-diff.format-patch_--stdout_initial..side
*   ok 93: git format-patch --stdout initial..side

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.format-patch_--stdout_initial..master^ b/0094-diff.format-patch_--stdout_initial..master^
*   ok 94: git format-patch --stdout initial..master^

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.format-patch_--stdout_initial..master b/0095-diff.format-patch_--stdout_initial..master
*   ok 95: git format-patch --stdout initial..master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.format-patch_--attach_--stdout_initial..side b/0096-diff.format-patch_--attach_--stdout_initial..side
*   ok 96: git format-patch --attach --stdout initial..side

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.format-patch_--attach_--stdout_initial..master^ b/0097-diff.format-patch_--attach_--stdout_initial..master^
*   ok 97: git format-patch --attach --stdout initial..master^

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.format-patch_--attach_--stdout_initial..master b/0098-diff.format-patch_--attach_--stdout_initial..master
*   ok 98: git format-patch --attach --stdout initial..master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.format-patch_--inline_--stdout_initial..side b/0099-diff.format-patch_--inline_--stdout_initial..side
*   ok 99: git format-patch --inline --stdout initial..side

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.format-patch_--inline_--stdout_initial..master^ b/0100-diff.format-patch_--inline_--stdout_initial..master^
*   ok 100: git format-patch --inline --stdout initial..master^

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.format-patch_--inline_--stdout_initial..master b/0101-diff.format-patch_--inline_--stdout_initial..master
*   ok 101: git format-patch --inline --stdout initial..master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master b/0102-diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master
*   ok 102: git format-patch --inline --stdout --subject-prefix=TESTCASE initial..master

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.config_format.subjectprefix_DIFFERENT_PREFIX b/0103-diff.config_format.subjectprefix_DIFFERENT_PREFIX
*   ok 103: git config format.subjectprefix DIFFERENT_PREFIX

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.format-patch_--inline_--stdout_initial..master^^ b/0104-diff.format-patch_--inline_--stdout_initial..master^^
*   ok 104: git format-patch --inline --stdout initial..master^^

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff_--abbrev_initial..side b/0105-diff.diff_--abbrev_initial..side
*   ok 105: git diff --abbrev initial..side

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff_-r_initial..side b/0106-diff.diff_-r_initial..side
*   ok 106: git diff -r initial..side

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff_--stat_initial..side b/0107-diff.diff_--stat_initial..side
*   ok 107: git diff --stat initial..side

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff_-r_--stat_initial..side b/0108-diff.diff_-r_--stat_initial..side
*   ok 108: git diff -r --stat initial..side

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff_initial..side b/0109-diff.diff_initial..side
*   ok 109: git diff initial..side

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff_--patch-with-stat_initial..side b/0110-diff.diff_--patch-with-stat_initial..side
*   ok 110: git diff --patch-with-stat initial..side

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff_--patch-with-raw_initial..side b/0111-diff.diff_--patch-with-raw_initial..side
*   ok 111: git diff --patch-with-raw initial..side

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff_--patch-with-stat_-r_initial..side b/0112-diff.diff_--patch-with-stat_-r_initial..side
*   ok 112: git diff --patch-with-stat -r initial..side

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff_--patch-with-raw_-r_initial..side b/0113-diff.diff_--patch-with-raw_-r_initial..side
*   ok 113: git diff --patch-with-raw -r initial..side

* expecting success: 
		{
			echo "\$ git $cmd"
			git $cmd |
			sed -e "s/^\(-*\)$V\(-*\)\$/\1g-i-t--v-e-r-s-i-o-n/" \
			    -e "s/^\(.*mixed; boundary=\"-*\)$V\(-*\)\"\$/\1g-i-t--v-e-r-s-i-o-n\"/"
			echo "\$"
		} >"$actual" &&
		if test -f "$expect"
		then
			git diff "$expect" "$actual" &&
			rm -f "$actual"
		else
			# this is to help developing new tests.
			cp "$actual" "$expect"
			false
		fi
	
diff --git a/../t4013/diff.diff_--name-status_dir2_dir b/0114-diff.diff_--name-status_dir2_dir
*   ok 114: git diff --name-status dir2 dir

* passed all 114 test(s)
*** t4014-format-patch.sh ***
* expecting success: 

	for i in 1 2 3 4 5 6 7 8 9 10; do echo "$i"; done >file &&
	cat file >elif &&
	git add file elif &&
	git commit -m Initial &&
	git checkout -b side &&

	for i in 1 2 5 6 A B C 7 8 9 10; do echo "$i"; done >file &&
	chmod +x elif &&
	git update-index file elif &&
	git update-index --chmod=+x elif &&
	git commit -m "Side changes #1" &&

	for i in D E F; do echo "$i"; done >>file &&
	git update-index file &&
	git commit -m "Side changes #2" &&
	git tag C2 &&

	for i in 5 6 1 2 3 A 4 B C 7 8 9 10 D E F; do echo "$i"; done >file &&
	git update-index file &&
	git commit -m "Side changes #3 with \n backslash-n in it." &&

	git checkout master &&
	git diff-tree -p C2 | git apply --index &&
	git commit -m "Master accepts moral equivalent of #2"


Created initial commit 6f46d78: Initial
 2 files changed, 20 insertions(+), 0 deletions(-)
 create mode 100644 elif
 create mode 100644 file
Switched to a new branch "side"
Created commit 281c6cc: Side changes #1
 1 files changed, 3 insertions(+), 2 deletions(-)
 mode change 100644 => 100755 elif
Created commit 3bd1a87: Side changes #2
 1 files changed, 3 insertions(+), 0 deletions(-)
Created commit 65d7502: Side changes #3 with \n backslash-n in it.
 1 files changed, 4 insertions(+), 2 deletions(-)
Switched to branch "master"
Created commit d277b7c: Master accepts moral equivalent of #2
 1 files changed, 3 insertions(+), 0 deletions(-)
*   ok 1: setup

* expecting success: 

	git format-patch --stdout master..side >patch0 &&
	cnt=`grep "^From " patch0 | wc -l` &&
	test $cnt = 3


*   ok 2: format-patch --ignore-if-in-upstream

* expecting success: 

	git format-patch --stdout \
		--ignore-if-in-upstream master..side >patch1 &&
	cnt=`grep "^From " patch1 | wc -l` &&
	test $cnt = 2


*   ok 3: format-patch --ignore-if-in-upstream

* expecting success: 

	git checkout -b rebuild-0 master &&
	git am -3 patch0 &&
	cnt=`git rev-list master.. | wc -l` &&
	test $cnt = 2

Switched to a new branch "rebuild-0"
Applying Side changes #1
Applying Side changes #2
error: patch failed: file:9
error: file: patch does not apply
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Merging HEAD with Side changes #2
Merging:
717a8f9 Side changes #1
virtual Side changes #2
found 1 common ancestor(s):
virtual b0f84a63c7701ca30ee6a573f3a8ea2f198b8c9b
No changes -- Patch already applied.
Applying Side changes #3 with \n backslash-n in it.
*   ok 4: format-patch result applies

* expecting success: 

	git checkout -b rebuild-1 master &&
	git am -3 patch1 &&
	cnt=`git rev-list master.. | wc -l` &&
	test $cnt = 2

Switched to a new branch "rebuild-1"
Applying Side changes #1
Applying Side changes #3 with \n backslash-n in it.
*   ok 5: format-patch --ignore-if-in-upstream result applies

* expecting success: 

	git cat-file commit side | grep "^Side .* with .* backslash-n"


Side changes #3 with \n backslash-n in it.
*   ok 6: commit did not screw up the log message

* expecting success: 

	grep "^Subject: .*Side changes #3 with .* backslash-n" patch0 &&
	grep "^Subject: .*Side changes #3 with .* backslash-n" patch1


Subject: [PATCH] Side changes #3 with \n backslash-n in it.
Subject: [PATCH] Side changes #3 with \n backslash-n in it.
*   ok 7: format-patch did not screw up the log message

* expecting success: 

	git cat-file commit rebuild-1 | grep "^Side .* with .* backslash-n"


Side changes #3 with \n backslash-n in it.
*   ok 8: replay did not screw up the log message

* passed all 8 test(s)
*** t4015-diff-whitespace.sh ***
* expecting success: git diff expect out
*   ok 1: Ray's example without options

* expecting success: git diff expect out
*   ok 2: Ray's example with -w

* expecting success: git diff expect out
*   ok 3: Ray's example with -b

* expecting success: git diff expect out
*   ok 4: another test, without options

* expecting success: git diff expect out
*   ok 5: another test, with -w

* expecting success: git diff expect out
*   ok 6: another test, with -b

* expecting success: 

	# This is indented with SP HT SP.
	echo " 	 foo();" > x &&
	git diff --check | grep "space before tab in indent"


x:1: space before tab in indent.
*   ok 7: check mixed spaces and tabs in indent

* expecting success: 

	# This is indented with HT SP HT.
	echo "	 	foo();" > x &&
	git diff --check | grep "space before tab in indent"


x:1: space before tab in indent.
*   ok 8: check mixed tabs and spaces in indent

* expecting success: 

	git commit -m "snapshot" &&
	echo "foo();" > x &&
	git diff --check


Created initial commit 8394f26: snapshot
 1 files changed, 6 insertions(+), 0 deletions(-)
 create mode 100644 x
*   ok 9: check with no whitespace errors

* expecting success: 

	echo "foo(); " > x &&
	! git diff --check


x:1: trailing whitespace.
+foo(); 
*   ok 10: check with trailing whitespace

* expecting success: 

	# indent has space followed by hard tab
	echo " 	foo();" > x &&
	! git diff --check


x:1: space before tab in indent.
+ 	foo();
*   ok 11: check with space before tab in indent

* expecting success: 

	git checkout x &&
	git diff --check --exit-code


*   ok 12: --check and --exit-code are not exclusive

* expecting success: 

	git diff --check --quiet


*   ok 13: --check and --quiet are not exclusive

* expecting success: 

	echo "foo();" > x &&
	git add x &&
	git diff --cached --check


*   ok 14: check staged with no whitespace errors

* expecting success: 

	echo "foo(); " > x &&
	git add x &&
	! git diff --cached --check


x:1: trailing whitespace.
+foo(); 
*   ok 15: check staged with trailing whitespace

* expecting success: 

	# indent has space followed by hard tab
	echo " 	foo();" > x &&
	git add x &&
	! git diff --cached --check


x:1: space before tab in indent.
+ 	foo();
*   ok 16: check staged with space before tab in indent

* expecting success: 

	echo "foo();" > x &&
	git add x &&
	git diff-index --check HEAD


*   ok 17: check with no whitespace errors (diff-index)

* expecting success: 

	echo "foo(); " > x &&
	git add x &&
	! git diff-index --check HEAD


x:1: trailing whitespace.
+foo(); 
*   ok 18: check with trailing whitespace (diff-index)

* expecting success: 

	# indent has space followed by hard tab
	echo " 	foo();" > x &&
	git add x &&
	! git diff-index --check HEAD


x:1: space before tab in indent.
+ 	foo();
*   ok 19: check with space before tab in indent (diff-index)

* expecting success: 

	echo "foo();" > x &&
	git add x &&
	git diff-index --cached --check HEAD


*   ok 20: check staged with no whitespace errors (diff-index)

* expecting success: 

	echo "foo(); " > x &&
	git add x &&
	! git diff-index --cached --check HEAD


x:1: trailing whitespace.
+foo(); 
*   ok 21: check staged with trailing whitespace (diff-index)

* expecting success: 

	# indent has space followed by hard tab
	echo " 	foo();" > x &&
	git add x &&
	! git diff-index --cached --check HEAD


x:1: space before tab in indent.
+ 	foo();
*   ok 22: check staged with space before tab in indent (diff-index)

* expecting success: 

	echo "foo();" > x &&
	git commit -m "new commit" x &&
	git diff-tree --check HEAD^ HEAD


Created commit 6cc8a71: new commit
 1 files changed, 1 insertions(+), 6 deletions(-)
*   ok 23: check with no whitespace errors (diff-tree)

* expecting success: 

	echo "foo(); " > x &&
	git commit -m "another commit" x &&
	! git diff-tree --check HEAD^ HEAD


Created commit 154804a: another commit
 1 files changed, 1 insertions(+), 1 deletions(-)
x:1: trailing whitespace.
+foo(); 
*   ok 24: check with trailing whitespace (diff-tree)

* expecting success: 

	# indent has space followed by hard tab
	echo " 	foo();" > x &&
	git commit -m "yet another" x &&
	! git diff-tree --check HEAD^ HEAD


Created commit 394084a: yet another
 1 files changed, 1 insertions(+), 1 deletions(-)
x:1: space before tab in indent.
+ 	foo();
*   ok 25: check with space before tab in indent (diff-tree)

* expecting success: 

	git config core.whitespace "-trailing-space" &&
	echo "foo ();   " > x &&
	git diff --check


*   ok 26: check trailing whitespace (trailing-space: off)

* expecting success: 

	git config core.whitespace "trailing-space" &&
	echo "foo ();   " > x &&
	! git diff --check


x:1: trailing whitespace.
+foo ();   
*   ok 27: check trailing whitespace (trailing-space: on)

* expecting success: 

	# indent contains space followed by HT
	git config core.whitespace "-space-before-tab" &&
	echo " 	foo ();" > x &&
	git diff --check


*   ok 28: check space before tab in indent (space-before-tab: off)

* expecting success: 

	# indent contains space followed by HT
	git config core.whitespace "space-before-tab" &&
	echo " 	foo ();   " > x &&
	! git diff --check


x:1: trailing whitespace, space before tab in indent.
+ 	foo ();   
*   ok 29: check space before tab in indent (space-before-tab: on)

* expecting success: 

	git config core.whitespace "-indent-with-non-tab"
	echo "        foo ();" > x &&
	git diff --check


*   ok 30: check spaces as indentation (indent-with-non-tab: off)

* expecting success: 

	git config core.whitespace "indent-with-non-tab" &&
	echo "        foo ();" > x &&
	! git diff --check


x:1: indent with spaces.
+        foo ();
*   ok 31: check spaces as indentation (indent-with-non-tab: on)

* expecting success: 

	git config core.whitespace "indent-with-non-tab" &&
	echo "	                foo ();" > x &&
	! git diff --check


x:1: indent with spaces.
+	                foo ();
*   ok 32: check tabs and spaces as indentation (indent-with-non-tab: on)

* expecting success: 

	echo "" > x &&
	echo "foo(); " >> x &&
	git diff --check | grep "x:2:"


x:2: trailing whitespace.
*   ok 33: line numbers in --check output are correct

* passed all 33 test(s)
*** t4016-diff-quote.sh ***
* expecting success: 
	echo P0.0 >"$P0.0" &&
	echo P0.1 >"$P0.1" &&
	echo P0.2 >"$P0.2" &&
	echo P0.3 >"$P0.3" &&
	echo P1.0 >"$P1.0" &&
	echo P1.2 >"$P1.2" &&
	echo P1.3 >"$P1.3" &&
	git add . &&
	git commit -m initial &&
	git mv "$P0.0" "R$P0.0" &&
	git mv "$P0.1" "R$P1.0" &&
	git mv "$P0.2" "R$P2.0" &&
	git mv "$P0.3" "R$P3.0" &&
	git mv "$P1.0" "R$P0.1" &&
	git mv "$P1.2" "R$P2.1" &&
	git mv "$P1.3" "R$P3.1" &&
	:

Created initial commit d46250c: initial
 7 files changed, 7 insertions(+), 0 deletions(-)
 create mode 100644 "pathname\twith HT.0"
 create mode 100644 "pathname\twith HT.2"
 create mode 100644 "pathname\twith HT.3"
 create mode 100644 pathname.0
 create mode 100644 pathname.1
 create mode 100644 pathname.2
 create mode 100644 pathname.3
*   ok 1: setup

* expecting success: 
	git diff --summary -M HEAD >actual &&
	git diff expect actual

*   ok 2: git diff --summary -M HEAD

* expecting success: 
	git diff --stat -M HEAD >actual &&
	git diff expect actual

*   ok 3: git diff --stat -M HEAD

* passed all 3 test(s)
*** t4017-diff-retval.sh ***
* expecting success: 
	echo 1 >a &&
	git add . &&
	git commit -m first &&
	echo 2 >b &&
	git add . &&
	git commit -a -m second

Created initial commit 5daa3d1: first
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 a
Created commit 3d55557: second
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 b
*   ok 1: setup

* expecting success: 
	git diff-tree --exit-code HEAD^ HEAD
	test $? = 1

:000000 100644 0000000000000000000000000000000000000000 0cfbf08886fca9a91cb753ec8734c84fcbe52c9f A	b
*   ok 2: git diff-tree HEAD^ HEAD

* expecting success: 
	git diff-tree --exit-code HEAD^ HEAD -- a
	test $? = 0

*   ok 3: git diff-tree HEAD^ HEAD -- a

* expecting success: 
	git diff-tree --exit-code HEAD^ HEAD -- b
	test $? = 1

:000000 100644 0000000000000000000000000000000000000000 0cfbf08886fca9a91cb753ec8734c84fcbe52c9f A	b
*   ok 4: git diff-tree HEAD^ HEAD -- b

* expecting success: 
	echo $(git rev-parse HEAD) | git diff-tree --exit-code --stdin
	test $? = 1

3d555578c1b53abcd58a41a8681a16294532f76d
:000000 100644 0000000000000000000000000000000000000000 0cfbf08886fca9a91cb753ec8734c84fcbe52c9f A	b
*   ok 5: echo HEAD | git diff-tree --stdin

* expecting success: 
	git diff-tree --exit-code HEAD HEAD
	test $? = 0

*   ok 6: git diff-tree HEAD HEAD

* expecting success: 
	git diff-files --exit-code
	test $? = 0

*   ok 7: git diff-files

* expecting success: 
	git diff-index --exit-code --cached HEAD
	test $? = 0

*   ok 8: git diff-index --cached HEAD

* expecting success: 
	git diff-index --exit-code --cached HEAD^
	test $? = 1

:000000 100644 0000000000000000000000000000000000000000 0cfbf08886fca9a91cb753ec8734c84fcbe52c9f A	b
*   ok 9: git diff-index --cached HEAD^

* expecting success: 
	echo text >>b &&
	echo 3 >c &&
	git add . && {
		git diff-index --exit-code --cached HEAD^
		test $? = 1
	}

:000000 100644 0000000000000000000000000000000000000000 6ba94de6433d6530a0fb55e5e6da01023a4bc9e3 A	b
:000000 100644 0000000000000000000000000000000000000000 00750edc07d6415dcc07ae0351e9397b0222b7ba A	c
*   ok 10: git diff-index --cached HEAD^

* expecting success: 
	git commit -m "text in b" && {
		git diff-tree -p --exit-code -Stext HEAD^ HEAD -- b
		test $? = 1
	}

Created commit 8d97fc8: text in b
 2 files changed, 2 insertions(+), 0 deletions(-)
 create mode 100644 c
diff --git a/b b/b
index 0cfbf08..6ba94de 100644
--- a/b
+++ b/b
@@ -1 +1,2 @@
 2
+text
*   ok 11: git diff-tree -Stext HEAD^ HEAD -- b

* expecting success: 
	git diff-tree -p --exit-code -Snot-found HEAD^ HEAD -- b
	test $? = 0

*   ok 12: git diff-tree -Snot-found HEAD^ HEAD -- b

* expecting success: 
	echo 3 >>c && {
		git diff-files --exit-code
		test $? = 1
	}

:100644 100644 00750edc07d6415dcc07ae0351e9397b0222b7ba 0000000000000000000000000000000000000000 M	c
*   ok 13: git diff-files

* expecting success: 
	git update-index c && {
		git diff-index --exit-code --cached HEAD
		test $? = 1
	}

:100644 100644 00750edc07d6415dcc07ae0351e9397b0222b7ba a5c8806279fa7d6b7d04418a47e21b7e89ab18f8 M	c
*   ok 14: git diff-index --cached HEAD

* expecting success: 

	git diff --check --exit-code


*   ok 15: --check --exit-code returns 0 for no difference

* expecting success: 

	echo "good" > a &&
	git diff --check --exit-code
	test $? = 1


*   ok 16: --check --exit-code returns 1 for a clean difference

* expecting success: 

	echo "bad   " >> a &&
	git diff --check --exit-code
	test $? = 3


a:2: trailing whitespace.
+bad   
*   ok 17: --check --exit-code returns 3 for a dirty difference

* expecting success: 

	git --no-pager diff --check
	test $? = 2


a:2: trailing whitespace.
+bad   
*   ok 18: --check with --no-pager returns 2 for dirty difference

* passed all 18 test(s)
*** t4017-quiet.sh ***
* expecting success: 
	echo 1 >a &&
	git add . &&
	git commit -m first &&
	echo 2 >b &&
	git add . &&
	git commit -a -m second

Created initial commit f0a507f: first
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 a
Created commit ee9fddb: second
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 b
*   ok 1: setup

* expecting success: 
	git diff-tree --quiet HEAD^ HEAD >cnt
	test $? = 1 && test $(wc -l <cnt) = 0

*   ok 2: git diff-tree HEAD^ HEAD

* expecting success: 
	git diff-tree --quiet HEAD^ HEAD -- a >cnt
	test $? = 0 && test $(wc -l <cnt) = 0

*   ok 3: git diff-tree HEAD^ HEAD -- a

* expecting success: 
	git diff-tree --quiet HEAD^ HEAD -- b >cnt
	test $? = 1 && test $(wc -l <cnt) = 0

*   ok 4: git diff-tree HEAD^ HEAD -- b

* expecting success: 
	echo $(git rev-parse HEAD) | git diff-tree --quiet --stdin >cnt
	test $? = 1 && test $(wc -l <cnt) = 1

*   ok 5: echo HEAD | git diff-tree --stdin

* expecting success: 
	git diff-tree --quiet HEAD HEAD >cnt
	test $? = 0 && test $(wc -l <cnt) = 0

*   ok 6: git diff-tree HEAD HEAD

* expecting success: 
	git diff-files --quiet >cnt
	test $? = 0 && test $(wc -l <cnt) = 0

*   ok 7: git diff-files

* expecting success: 
	git diff-index --quiet --cached HEAD >cnt
	test $? = 0 && test $(wc -l <cnt) = 0

*   ok 8: git diff-index --cached HEAD

* expecting success: 
	git diff-index --quiet --cached HEAD^ >cnt
	test $? = 1 && test $(wc -l <cnt) = 0

*   ok 9: git diff-index --cached HEAD^

* expecting success: 
	echo text >>b &&
	echo 3 >c &&
	git add . && {
		git diff-index --quiet --cached HEAD^ >cnt
		test $? = 1 && test $(wc -l <cnt) = 0
	}

*   ok 10: git diff-index --cached HEAD^

* expecting success: 
	git commit -m "text in b" && {
		git diff-tree --quiet -Stext HEAD^ HEAD -- b >cnt
		test $? = 1 && test $(wc -l <cnt) = 0
	}

Created commit e3632f9: text in b
 2 files changed, 2 insertions(+), 0 deletions(-)
 create mode 100644 c
 create mode 100644 cnt
*   ok 11: git diff-tree -Stext HEAD^ HEAD -- b

* expecting success: 
	git diff-tree --quiet -Snot-found HEAD^ HEAD -- b >cnt
	test $? = 0 && test $(wc -l <cnt) = 0

*   ok 12: git diff-tree -Snot-found HEAD^ HEAD -- b

* expecting success: 
	echo 3 >>c && {
		git diff-files --quiet >cnt
		test $? = 1 && test $(wc -l <cnt) = 0
	}

*   ok 13: git diff-files

* expecting success: 
	git update-index c && {
		git diff-index --quiet --cached HEAD >cnt
		test $? = 1 && test $(wc -l <cnt) = 0
	}

*   ok 14: git diff-index --cached HEAD

* passed all 14 test(s)
*** t4018-diff-funcname.sh ***
* expecting success: 
	git diff Beer.java Beer-correct.java |
	grep "^@@.*@@ public class Beer"

@@ -7,7 +7,7 @@ public class Beer
*   ok 1: default behaviour

* expecting success: 
	echo "*.java diff=java" >.gitattributes &&
	git diff Beer.java Beer-correct.java |
	grep "^@@.*@@ public static void main("

@@ -7,7 +7,7 @@ public static void main(String args[])
*   ok 2: preset java pattern

* expecting success: 
	git diff Beer.java Beer-correct.java |
	grep "^@@.*@@ int special;$"

@@ -7,7 +7,7 @@ int special;
*   ok 3: custom pattern

* expecting success: 
	git config diff.java.funcname "!static" &&
	! git diff Beer.java Beer-correct.java

fatal: Last expression must not be negated: !static
diff --git a/Beer.java b/Beer-correct.java
index ce417bf..33ae174 100644
*   ok 4: last regexp must not be negated

* passed all 4 test(s)
*** t4019-diff-wserror.sh ***
* expecting success: 

	git config diff.color.whitespace "blue reverse" &&
	>F &&
	git add F &&
	echo "         Eight SP indent" >>F &&
	echo " 	HT and SP indent" >>F &&
	echo "With trailing SP " >>F &&
	echo "No problem" >>F


*   ok 1: setup

* expecting success: 

	git diff --color >output
	grep "$blue_grep" output >error
	grep -v "$blue_grep" output >normal

	grep Eight normal >/dev/null &&
	grep HT error >/dev/null &&
	grep With error >/dev/null &&
	grep No normal >/dev/null


*   ok 2: default

* expecting success: 

	git config core.whitespace -trail
	git diff --color >output
	grep "$blue_grep" output >error
	grep -v "$blue_grep" output >normal

	grep Eight normal >/dev/null &&
	grep HT error >/dev/null &&
	grep With normal >/dev/null &&
	grep No normal >/dev/null


*   ok 3: without -trail

* expecting success: 

	git config --unset core.whitespace
	echo "F whitespace=-trail" >.gitattributes
	git diff --color >output
	grep "$blue_grep" output >error
	grep -v "$blue_grep" output >normal

	grep Eight normal >/dev/null &&
	grep HT error >/dev/null &&
	grep With normal >/dev/null &&
	grep No normal >/dev/null


*   ok 4: without -trail (attribute)

* expecting success: 

	rm -f .gitattributes
	git config core.whitespace -space
	git diff --color >output
	grep "$blue_grep" output >error
	grep -v "$blue_grep" output >normal

	grep Eight normal >/dev/null &&
	grep HT normal >/dev/null &&
	grep With error >/dev/null &&
	grep No normal >/dev/null


*   ok 5: without -space

* expecting success: 

	git config --unset core.whitespace
	echo "F whitespace=-space" >.gitattributes
	git diff --color >output
	grep "$blue_grep" output >error
	grep -v "$blue_grep" output >normal

	grep Eight normal >/dev/null &&
	grep HT normal >/dev/null &&
	grep With error >/dev/null &&
	grep No normal >/dev/null


*   ok 6: without -space (attribute)

* expecting success: 

	rm -f .gitattributes
	git config core.whitespace indent,-trailing,-space
	git diff --color >output
	grep "$blue_grep" output >error
	grep -v "$blue_grep" output >normal

	grep Eight error >/dev/null &&
	grep HT normal >/dev/null &&
	grep With normal >/dev/null &&
	grep No normal >/dev/null


*   ok 7: with indent-non-tab only

* expecting success: 

	git config --unset core.whitespace
	echo "F whitespace=indent,-trailing,-space" >.gitattributes
	git diff --color >output
	grep "$blue_grep" output >error
	grep -v "$blue_grep" output >normal

	grep Eight error >/dev/null &&
	grep HT normal >/dev/null &&
	grep With normal >/dev/null &&
	grep No normal >/dev/null


*   ok 8: with indent-non-tab only (attribute)

* passed all 8 test(s)
*** t4020-diff-external.sh ***
* expecting success: 

	test_tick &&
	echo initial >file &&
	git add file &&
	git commit -m initial &&

	test_tick &&
	echo second >file &&
	git add file &&
	git commit -m second &&

	test_tick &&
	echo third >file

Created initial commit b6d2089: initial
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 file
Created commit f3562cd: second
 1 files changed, 1 insertions(+), 1 deletions(-)
*   ok 1: setup

* expecting success: 

	GIT_EXTERNAL_DIFF=echo git diff | {
		read path oldfile oldhex oldmode newfile newhex newmode &&
		test "z$path" = zfile &&
		test "z$oldmode" = z100644 &&
		test "z$newhex" = "z$_z40" &&
		test "z$newmode" = z100644 &&
		oh=$(git rev-parse --verify HEAD:file) &&
		test "z$oh" = "z$oldhex"
	}


*   ok 2: GIT_EXTERNAL_DIFF environment

* expecting success: 

	GIT_EXTERNAL_DIFF=echo git log -p -1 HEAD |
	grep "^diff --git a/file b/file"


diff --git a/file b/file
*   ok 3: GIT_EXTERNAL_DIFF environment should apply only to diff

* expecting success: 

	git config diff.parrot.command echo &&

	echo >.gitattributes "file diff=parrot" &&

	git diff | {
		read path oldfile oldhex oldmode newfile newhex newmode &&
		test "z$path" = zfile &&
		test "z$oldmode" = z100644 &&
		test "z$newhex" = "z$_z40" &&
		test "z$newmode" = z100644 &&
		oh=$(git rev-parse --verify HEAD:file) &&
		test "z$oh" = "z$oldhex"
	}


*   ok 4: diff attribute

* expecting success: 

	git log -p -1 HEAD |
	grep "^diff --git a/file b/file"


diff --git a/file b/file
*   ok 5: diff attribute should apply only to diff

* expecting success: 

	git config --unset diff.parrot.command &&
	git config diff.color.command echo &&

	echo >.gitattributes "file diff=color" &&

	git diff | {
		read path oldfile oldhex oldmode newfile newhex newmode &&
		test "z$path" = zfile &&
		test "z$oldmode" = z100644 &&
		test "z$newhex" = "z$_z40" &&
		test "z$newmode" = z100644 &&
		oh=$(git rev-parse --verify HEAD:file) &&
		test "z$oh" = "z$oldhex"
	}


*   ok 6: diff attribute

* expecting success: 

	git log -p -1 HEAD |
	grep "^diff --git a/file b/file"


diff --git a/file b/file
*   ok 7: diff attribute should apply only to diff

* expecting success: 
	echo >.gitattributes "file -diff" &&
	git diff | grep Binary

Binary files a/file and b/file differ
*   ok 8: no diff with -diff

* expecting success: 
	echo >.gitattributes "file diff" &&
	git diff | grep -a second

-second
*   ok 9: force diff with "diff"

* passed all 9 test(s)
*** t4021-format-patch-numbered.sh ***
* expecting success: 

	echo A > file &&
	git add file &&
	git commit -m First &&

	echo B >> file &&
	git commit -a -m Second &&

	echo C >> file &&
	git commit -a -m Third


Created initial commit eb0cedc: First
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 file
Created commit 0830182: Second
 1 files changed, 1 insertions(+), 0 deletions(-)
Created commit a8d5321: Third
 1 files changed, 1 insertions(+), 0 deletions(-)
*   ok 1: setup

* expecting success: 

	git format-patch --stdout HEAD~2 >patch0 &&
	test_no_numbered patch0


*   ok 2: Default: no numbered

* expecting success: 

	git format-patch --numbered --stdout HEAD~2 >patch1 &&
	test_numbered patch1


Subject: [PATCH 1/2] Second
Subject: [PATCH 2/2] Third
*   ok 3: Use --numbered

* expecting success: 

	git config format.numbered true &&
	git format-patch --stdout HEAD~2 >patch2 &&
	test_numbered patch2


Subject: [PATCH 1/2] Second
Subject: [PATCH 2/2] Third
*   ok 4: format.numbered = true

* expecting success: 

	git format-patch --stdout HEAD^ > patch3 &&
	test_single_numbered patch3


Subject: [PATCH 1/1] Third
*   ok 5: format.numbered && single patch

* expecting success: 

	git format-patch --no-numbered --stdout HEAD~2 >patch4 &&
	test_no_numbered patch4


*   ok 6: format.numbered && --no-numbered

* expecting success: 

	git config format.numbered auto
	git format-patch --stdout HEAD~2 > patch5 &&
	test_numbered patch5


Subject: [PATCH 1/2] Second
Subject: [PATCH 2/2] Third
*   ok 7: format.numbered = auto

* expecting success: 

	git format-patch --stdout HEAD^ > patch6 &&
	test_single_no_numbered patch6


*   ok 8: format.numbered = auto && single patch

* expecting success: 

	git format-patch --no-numbered --stdout HEAD~2 > patch7 &&
	test_no_numbered patch7


*   ok 9: format.numbered = auto && --no-numbered

* passed all 9 test(s)
*** t4021-format-patch-signer-mime.sh ***
* expecting success: 

	>F &&
	git add F &&
	git commit -m initial &&
	echo new line >F &&

	test_tick &&
	git commit -m "This adds some lines to F" F


Created initial commit ca126e9: initial
 0 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 F
Created commit 1967907: This adds some lines to F
 1 files changed, 1 insertions(+), 0 deletions(-)
*   ok 1: setup

* expecting success: 

	git format-patch --stdout -1 >output &&
	! grep Content-Type output


*   ok 2: format normally

* expecting success: 

	git format-patch -s --stdout -1 >output &&
	! grep Content-Type output


*   ok 3: format with signoff without funny signer name

* expecting success: 

	GIT_COMMITTER_NAME="$B$O$^$N(B $B$U$K$*$&(B" \
	git format-patch -s --stdout -1 >output &&
	grep Content-Type output


Content-Type: text/plain; charset=utf-8
Signed-off-by: $^(B 	GIT_COMMITTER_NAME="$B$O$^$N(B $B$U$K$*$&(B" \	git format-patch -s --stdout -1 output &&	grep Content-Type output$&(B <committer at example.com>
*   ok 4: format with non ASCII signer name

* passed all 4 test(s)
*** t4022-diff-rewrite.sh ***
* expecting success: 

	cat ../../COPYING >test &&
	git add test &&
	tr a-zA-Z n-za-mN-ZA-M <../../COPYING >test


*   ok 1: setup

* expecting success: 

	actual=$(git diff-files -B --summary test) &&
	expr "$actual" : " rewrite test ([0-9]*%)$" || {
		echo "Eh? <<$actual>>"
		false
	}


19
*   ok 2: detect rewrite

* passed all 2 test(s)
*** t4023-diff-rename-typechange.sh ***
* expecting success: 

	rm -f foo bar &&
	cat ../../COPYING >foo &&
	ln -s linklink bar &&
	git add foo bar &&
	git commit -a -m Initial &&
	git tag one &&

	rm -f foo bar &&
	cat ../../COPYING >bar &&
	ln -s linklink foo &&
	git add foo bar &&
	git commit -a -m Second &&
	git tag two &&

	rm -f foo bar &&
	cat ../../COPYING >foo &&
	git add foo &&
	git commit -a -m Third &&
	git tag three &&

	mv foo bar &&
	ln -s linklink foo &&
	git add foo bar &&
	git commit -a -m Fourth &&
	git tag four &&

	# This is purely for sanity check

	rm -f foo bar &&
	cat ../../COPYING >foo &&
	cat ../../Makefile >bar &&
	git add foo bar &&
	git commit -a -m Fifth &&
	git tag five &&

	rm -f foo bar &&
	cat ../../Makefile >foo &&
	cat ../../COPYING >bar &&
	git add foo bar &&
	git commit -a -m Sixth &&
	git tag six


Created initial commit c3bf1fd: Initial
 2 files changed, 362 insertions(+), 0 deletions(-)
 create mode 120000 bar
 create mode 100644 foo
Created commit c29506b: Second
 2 files changed, 0 insertions(+), 0 deletions(-)
 rename foo => bar (100%)
 rename bar => foo (100%)
Created commit 6e6d535: Third
 1 files changed, 0 insertions(+), 0 deletions(-)
 rename bar => foo (100%)
Created commit d139aea: Fourth
 2 files changed, 1 insertions(+), 361 deletions(-)
 rename foo => bar (100%)
 rewrite foo (100%)
 mode change 100644 => 120000
Created commit 9879dc7: Fifth
 2 files changed, 1208 insertions(+), 361 deletions(-)
 rewrite bar (98%)
 rename bar => foo (100%)
Created commit b84385c: Sixth
 2 files changed, 0 insertions(+), 0 deletions(-)
 rename foo => bar (100%)
 rename bar => foo (100%)
*   ok 1: setup

* expecting success: 

	git diff-tree five six -r --name-status -B -M | sort >actual &&
	{
		echo "R100	foo	bar"
		echo "R100	bar	foo"
	} | sort >expect &&
	diff -u expect actual


*   ok 2: cross renames to be detected for regular files

* expecting success: 

	git diff-tree one two -r --name-status -B -M | sort >actual &&
	{
		echo "R100	foo	bar"
		echo "R100	bar	foo"
	} | sort >expect &&
	diff -u expect actual


*   ok 3: cross renames to be detected for typechange

* expecting success: 

	git diff-tree three four -r --name-status -B -M | sort >actual &&
	{
		echo "R100	foo	bar"
		echo "T100	foo"
	} | sort >expect &&
	diff -u expect actual


*   ok 4: moves and renames

* passed all 4 test(s)
*** t4024-diff-optimize-common.sh ***
* expecting success: 

	for n in $sample
	do
		( zs $n ; echo a ) >file-a$n &&
		( echo b; zs $n; echo ) >file-b$n &&
		( printf c; zs $n ) >file-c$n &&
		( echo d; zs $n ) >file-d$n &&

		git add file-a$n file-b$n file-c$n file-d$n &&

		( zs $n ; echo A ) >file-a$n &&
		( echo B; zs $n; echo ) >file-b$n &&
		( printf C; zs $n ) >file-c$n &&
		( echo D; zs $n ) >file-d$n &&

		expect_pattern $n || break

	done >expect

*   ok 1: setup

* expecting success: 

	for n in $sample
	do
		git diff -U0 file-?$n
	done | zc >actual &&
	diff -u expect actual


*   ok 2: diff -U0

* passed all 2 test(s)
*** t4025-hunk-header.sh ***
* expecting success: 

	(
		echo "A $NS"
		for c in B C D E F G H I J K
		do
			echo "  $c"
		done
		echo "L  $NS"
		for c in M N O P Q R S T U V
		do
			echo "  $c"
		done
	) >file &&
	git add file &&

	sed -e "/^  [EP]/s/$/ modified/" <file >file+ &&
	mv file+ file


*   ok 1: setup

* expecting success: 

	git diff | sed -n -e "s/^.*@@//p" >actual &&
	(
		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


*   ok 2: hunk header truncation with an overly long line

* passed all 2 test(s)
*** t4026-color.sh ***
* expecting success: 
	color "reset" "[m"

*   ok 1: reset

* expecting success: 
	color "bold red" "[1;31m"

*   ok 2: attribute before color name

* expecting success: 
	color "red bold" "[1;31m"

*   ok 3: color name before attribute

* expecting success: 
	color "ul blue red" "[4;34;41m"

*   ok 4: attr fg bg

* expecting success: 
	color "blue ul red" "[4;34;41m"

*   ok 5: fg attr bg

* expecting success: 
	color "blue red ul" "[4;34;41m"

*   ok 6: fg bg attr

* expecting success: 
	color "254 bold 255" "[1;38;5;254;48;5;255m"

*   ok 7: 256 colors

* expecting success: 
	invalid_color "-2"

*   ok 8: color too small

* expecting success: 
	invalid_color "256"

*   ok 9: color too big

* expecting success: 
	invalid_color "3X"

*   ok 10: extra character after color number

* expecting success: 
	invalid_color "redX"

*   ok 11: extra character after color name

* expecting success: 
	invalid_color "dimX"

*   ok 12: extra character after attribute

* passed all 12 test(s)
*** t4100-apply-stat.sh ***
* expecting success: git apply --stat --summary <../t4100/t-apply-1.patch >current &&
    git diff ../t4100/t-apply-1.expect current
diff --git a/../t4100/t-apply-1.expect b/current
*   ok 1: rename

* expecting success: git apply --stat --summary <../t4100/t-apply-2.patch >current &&
    git diff ../t4100/t-apply-2.expect current
diff --git a/../t4100/t-apply-2.expect b/current
*   ok 2: copy

* expecting success: git apply --stat --summary <../t4100/t-apply-3.patch >current &&
    git diff ../t4100/t-apply-3.expect current
diff --git a/../t4100/t-apply-3.expect b/current
*   ok 3: rewrite

* expecting success: git apply --stat --summary <../t4100/t-apply-4.patch >current &&
    git diff ../t4100/t-apply-4.expect current
diff --git a/../t4100/t-apply-4.expect b/current
*   ok 4: mode

* expecting success: git apply --stat --summary <../t4100/t-apply-5.patch >current &&
    git diff ../t4100/t-apply-5.expect current
diff --git a/../t4100/t-apply-5.expect b/current
*   ok 5: non git

* expecting success: git apply --stat --summary <../t4100/t-apply-6.patch >current &&
    git diff ../t4100/t-apply-6.expect current
diff --git a/../t4100/t-apply-6.expect b/current
*   ok 6: non git

* expecting success: git apply --stat --summary <../t4100/t-apply-7.patch >current &&
    git diff ../t4100/t-apply-7.expect current
diff --git a/../t4100/t-apply-7.expect b/current
*   ok 7: non git

* passed all 7 test(s)
*** t4101-apply-nonl.sh ***
* expecting success: git apply <../t4101/diff.0-1 && diff frotz.1 frotz
*   ok 1: apply diff between 0 and 1

* expecting success: git apply <../t4101/diff.0-2 && diff frotz.2 frotz
*   ok 2: apply diff between 0 and 2

* expecting success: git apply <../t4101/diff.0-3 && diff frotz.3 frotz
*   ok 3: apply diff between 0 and 3

* expecting success: git apply <../t4101/diff.1-0 && diff frotz.0 frotz
*   ok 4: apply diff between 1 and 0

* expecting success: git apply <../t4101/diff.1-2 && diff frotz.2 frotz
*   ok 5: apply diff between 1 and 2

* expecting success: git apply <../t4101/diff.1-3 && diff frotz.3 frotz
*   ok 6: apply diff between 1 and 3

* expecting success: git apply <../t4101/diff.2-0 && diff frotz.0 frotz
*   ok 7: apply diff between 2 and 0

* expecting success: git apply <../t4101/diff.2-1 && diff frotz.1 frotz
*   ok 8: apply diff between 2 and 1

* expecting success: git apply <../t4101/diff.2-3 && diff frotz.3 frotz
*   ok 9: apply diff between 2 and 3

* expecting success: git apply <../t4101/diff.3-0 && diff frotz.0 frotz
*   ok 10: apply diff between 3 and 0

* expecting success: git apply <../t4101/diff.3-1 && diff frotz.1 frotz
*   ok 11: apply diff between 3 and 1

* expecting success: git apply <../t4101/diff.3-2 && diff frotz.2 frotz
*   ok 12: apply diff between 3 and 2

* passed all 12 test(s)
*** t4102-apply-rename.sh ***
* expecting success: git update-index --add foo
*   ok 1: setup

* expecting success: git apply --index --stat --summary --apply test-patch
 bar |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
 rename foo => bar (47%)
*   ok 2: apply

* expecting success: test -f bar && ls -l bar | grep "^-..x......"
-rwxr-xr-x 1 buildd buildd 12 Jul  5 10:12 bar
*   ok 3: validate

* expecting success: git apply -R --index --stat --summary --apply test-patch &&
     test "$(cat foo)" = "This is foo"
 foo |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
 rename bar => foo (47%)
*   ok 4: apply reverse

* expecting success: git apply --index --stat --summary --apply test-patch &&
     test "$(cat bar)" = "This is bar" -a "$(cat foo)" = "This is foo"
 bar |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
 copy foo => bar (47%)
*   ok 5: apply copy

* passed all 5 test(s)
*** t4103-apply-binary.sh ***
Created initial commit 351ede0: Initial Version
 3 files changed, 15 insertions(+), 0 deletions(-)
 create mode 100644 file1
 create mode 100644 file2
 create mode 100644 file4
Switched to a new branch "binary"
Created commit c4d2848: Second Version
 3 files changed, 2 insertions(+), 2 deletions(-)
 rename file2 => file3 (57%)
* expecting success: git-checkout master
	 git apply --stat --summary B.diff
Switched to branch "master"
 file1 |    4 ++--
 file2 |    5 -----
 file3 |  Bin
 file4 |  Bin
 4 files changed, 2 insertions(+), 7 deletions(-)
 delete mode 100644 file2
 create mode 100644 file3
*   ok 1: stat binary diff -- should not fail.

* expecting success: git-checkout master
	 git apply --stat --summary C.diff
Already on branch "master"
 file1 |    4 ++--
 file3 |  Bin
 file4 |  Bin
 3 files changed, 2 insertions(+), 2 deletions(-)
 rename file2 => file3 (57%)
*   ok 2: stat binary diff (copy) -- should not fail.

* expecting failure: git-checkout master
	 git apply --check B.diff
Already on branch "master"
error: cannot apply binary patch to 'file3' without full index line
error: file3: patch does not apply
error: cannot apply binary patch to 'file4' without full index line
error: file4: patch does not apply
*   ok 3: check binary diff -- should fail.

* expecting failure: git-checkout master
	 git apply --check C.diff
Already on branch "master"
error: cannot apply binary patch to 'file2' without full index line
error: file2: patch does not apply
error: cannot apply binary patch to 'file4' without full index line
error: file4: patch does not apply
*   ok 4: check binary diff (copy) -- should fail.

* expecting failure: git-checkout master
	 git apply --check --allow-binary-replacement B.diff
Already on branch "master"
error: cannot apply binary patch to 'file3' without full index line
error: file3: patch does not apply
error: cannot apply binary patch to 'file4' without full index line
error: file4: patch does not apply
*   ok 5: check incomplete binary diff with replacement -- should fail.

* expecting failure: git-checkout master
	 git apply --check --allow-binary-replacement C.diff
Already on branch "master"
error: cannot apply binary patch to 'file2' without full index line
error: file2: patch does not apply
error: cannot apply binary patch to 'file4' without full index line
error: file4: patch does not apply
*   ok 6: check incomplete binary diff with replacement (copy) -- should fail.

* expecting success: git-checkout master
	 git apply --check --allow-binary-replacement BF.diff
Already on branch "master"
*   ok 7: check binary diff with replacement.

* expecting success: git-checkout master
	 git apply --check --allow-binary-replacement CF.diff
Already on branch "master"
*   ok 8: check binary diff with replacement (copy).

* expecting failure: do_reset
	 git apply B.diff
HEAD is now at 351ede0... Initial Version
Already on branch "master"
error: cannot apply binary patch to 'file3' without full index line
error: file3: patch does not apply
error: cannot apply binary patch to 'file4' without full index line
error: file4: patch does not apply
*   ok 9: apply binary diff -- should fail.

* expecting failure: do_reset
	 git apply --index B.diff
HEAD is now at 351ede0... Initial Version
Already on branch "master"
error: cannot apply binary patch to 'file3' without full index line
error: file3: patch does not apply
error: cannot apply binary patch to 'file4' without full index line
error: file4: patch does not apply
*   ok 10: apply binary diff -- should fail.

* expecting failure: do_reset
	 git apply C.diff
HEAD is now at 351ede0... Initial Version
Already on branch "master"
error: cannot apply binary patch to 'file2' without full index line
error: file2: patch does not apply
error: cannot apply binary patch to 'file4' without full index line
error: file4: patch does not apply
*   ok 11: apply binary diff (copy) -- should fail.

* expecting failure: do_reset
	 git apply --index C.diff
HEAD is now at 351ede0... Initial Version
Already on branch "master"
error: cannot apply binary patch to 'file2' without full index line
error: file2: patch does not apply
error: cannot apply binary patch to 'file4' without full index line
error: file4: patch does not apply
*   ok 12: apply binary diff (copy) -- should fail.

* expecting success: do_reset
	 git apply BF.diff
HEAD is now at 351ede0... Initial Version
Already on branch "master"
*   ok 13: apply binary diff without replacement.

* expecting success: do_reset
	 git apply CF.diff
HEAD is now at 351ede0... Initial Version
Already on branch "master"
*   ok 14: apply binary diff without replacement (copy).

* expecting success: do_reset
	 git apply --allow-binary-replacement --index BF.diff &&
	 test -z "$(git diff --name-status binary)"
HEAD is now at 351ede0... Initial Version
Already on branch "master"
*   ok 15: apply binary diff.

* expecting success: do_reset
	 git apply --allow-binary-replacement --index CF.diff &&
	 test -z "$(git diff --name-status binary)"
HEAD is now at 351ede0... Initial Version
Already on branch "master"
*   ok 16: apply binary diff (copy).

* passed all 16 test(s)
*** t4104-apply-boundary.sh ***
* expecting success: 
	for i in b c d e f g h i j k l m n o p q r s t u v w x y
	do
		echo $i
	done >victim &&
	cat victim >original &&
	git update-index --add victim &&

	: add to the head
	for i in a b c d e f g h i j k l m n o p q r s t u v w x y
	do
		echo $i
	done >victim &&
	cat victim >add-a-expect &&
	git diff victim >add-a-patch.with &&
	git diff --unified=0 >add-a-patch.without &&

	: modify at the head
	for i in a c d e f g h i j k l m n o p q r s t u v w x y
	do
		echo $i
	done >victim &&
	cat victim >mod-a-expect &&
	git diff victim >mod-a-patch.with &&
	git diff --unified=0 >mod-a-patch.without &&

	: remove from the head
	for i in c d e f g h i j k l m n o p q r s t u v w x y
	do
		echo $i
	done >victim &&
	cat victim >del-a-expect &&
	git diff victim >del-a-patch.with
	git diff --unified=0 >del-a-patch.without &&

	: add to the tail
	for i in b c d e f g h i j k l m n o p q r s t u v w x y z
	do
		echo $i
	done >victim &&
	cat victim >add-z-expect &&
	git diff victim >add-z-patch.with &&
	git diff --unified=0 >add-z-patch.without &&

	: modify at the tail
	for i in a c d e f g h i j k l m n o p q r s t u v w x y
	do
		echo $i
	done >victim &&
	cat victim >mod-z-expect &&
	git diff victim >mod-z-patch.with &&
	git diff --unified=0 >mod-z-patch.without &&

	: remove from the tail
	for i in b c d e f g h i j k l m n o p q r s t u v w x
	do
		echo $i
	done >victim &&
	cat victim >del-z-expect &&
	git diff victim >del-z-patch.with
	git diff --unified=0 >del-z-patch.without &&

	: done

*   ok 1: setup

* expecting success: 
			cat original >victim &&
			git update-index victim &&
			git apply --index add-a-patch.with || {
				cat add-a-patch.with
				(exit 1)
			} &&
			git diff add-a-expect victim
		
*   ok 2: apply add-a-patch with context

* expecting success: 
			cat original >victim &&
			git update-index victim &&
			git apply --index add-z-patch.with || {
				cat add-z-patch.with
				(exit 1)
			} &&
			git diff add-z-expect victim
		
*   ok 3: apply add-z-patch with context

* expecting success: 
			cat original >victim &&
			git update-index victim &&
			git apply --index mod-a-patch.with || {
				cat mod-a-patch.with
				(exit 1)
			} &&
			git diff mod-a-expect victim
		
*   ok 4: apply mod-a-patch with context

* expecting success: 
			cat original >victim &&
			git update-index victim &&
			git apply --index mod-z-patch.with || {
				cat mod-z-patch.with
				(exit 1)
			} &&
			git diff mod-z-expect victim
		
*   ok 5: apply mod-z-patch with context

* expecting success: 
			cat original >victim &&
			git update-index victim &&
			git apply --index del-a-patch.with || {
				cat del-a-patch.with
				(exit 1)
			} &&
			git diff del-a-expect victim
		
*   ok 6: apply del-a-patch with context

* expecting success: 
			cat original >victim &&
			git update-index victim &&
			git apply --index del-z-patch.with || {
				cat del-z-patch.with
				(exit 1)
			} &&
			git diff del-z-expect victim
		
*   ok 7: apply del-z-patch with context

* expecting success: 
			cat original >victim &&
			git update-index victim &&
			git apply --index --unidiff-zero add-a-patch.without || {
				cat add-a-patch.without
				(exit 1)
			} &&
			git diff add-a-expect victim
		
*   ok 8: apply add-a-patch without context

* expecting success: 
			cat original >victim &&
			git update-index victim &&
			git apply --index --unidiff-zero add-z-patch.without || {
				cat add-z-patch.without
				(exit 1)
			} &&
			git diff add-z-expect victim
		
*   ok 9: apply add-z-patch without context

* expecting success: 
			cat original >victim &&
			git update-index victim &&
			git apply --index --unidiff-zero mod-a-patch.without || {
				cat mod-a-patch.without
				(exit 1)
			} &&
			git diff mod-a-expect victim
		
*   ok 10: apply mod-a-patch without context

* expecting success: 
			cat original >victim &&
			git update-index victim &&
			git apply --index --unidiff-zero mod-z-patch.without || {
				cat mod-z-patch.without
				(exit 1)
			} &&
			git diff mod-z-expect victim
		
*   ok 11: apply mod-z-patch without context

* expecting success: 
			cat original >victim &&
			git update-index victim &&
			git apply --index --unidiff-zero del-a-patch.without || {
				cat del-a-patch.without
				(exit 1)
			} &&
			git diff del-a-expect victim
		
*   ok 12: apply del-a-patch without context

* expecting success: 
			cat original >victim &&
			git update-index victim &&
			git apply --index --unidiff-zero del-z-patch.without || {
				cat del-z-patch.without
				(exit 1)
			} &&
			git diff del-z-expect victim
		
*   ok 13: apply del-z-patch without context

* expecting success: 
		cat original >victim &&
		git update-index victim &&
		git apply --unidiff-zero --index add-a-ng.without || {
			cat add-a-ng.without
			(exit 1)
		} &&
		git diff add-a-expect victim
	
*   ok 14: apply non-git add-a-patch without context

* expecting success: 
		cat original >victim &&
		git update-index victim &&
		git apply --unidiff-zero --index add-z-ng.without || {
			cat add-z-ng.without
			(exit 1)
		} &&
		git diff add-z-expect victim
	
*   ok 15: apply non-git add-z-patch without context

* expecting success: 
		cat original >victim &&
		git update-index victim &&
		git apply --unidiff-zero --index mod-a-ng.without || {
			cat mod-a-ng.without
			(exit 1)
		} &&
		git diff mod-a-expect victim
	
*   ok 16: apply non-git mod-a-patch without context

* expecting success: 
		cat original >victim &&
		git update-index victim &&
		git apply --unidiff-zero --index mod-z-ng.without || {
			cat mod-z-ng.without
			(exit 1)
		} &&
		git diff mod-z-expect victim
	
*   ok 17: apply non-git mod-z-patch without context

* expecting success: 
		cat original >victim &&
		git update-index victim &&
		git apply --unidiff-zero --index del-a-ng.without || {
			cat del-a-ng.without
			(exit 1)
		} &&
		git diff del-a-expect victim
	
*   ok 18: apply non-git del-a-patch without context

* expecting success: 
		cat original >victim &&
		git update-index victim &&
		git apply --unidiff-zero --index del-z-ng.without || {
			cat del-z-ng.without
			(exit 1)
		} &&
		git diff del-z-expect victim
	
*   ok 19: apply non-git del-z-patch without context

* passed all 19 test(s)
*** t4109-apply-multifrag.sh ***
* expecting success: git apply patch1.patch patch2.patch
*   ok 1: S = git apply (1)

* expecting success: cat patch1.patch patch2.patch | patch -p1
patching file main.c
patching file main.c
*   ok 2: S = patch (1)

* expecting success: cmp main.c.git main.c
*   ok 3: S = cmp (1)

* expecting success: git apply patch1.patch patch2.patch patch3.patch
*   ok 4: S = git apply (2)

* expecting success: cat patch1.patch patch2.patch patch3.patch | patch -p1
patching file main.c
patching file main.c
patching file main.c
*   ok 5: S = patch (2)

* expecting success: cmp main.c.git main.c
*   ok 6: S = cmp (2)

* expecting success: git apply patch1.patch patch4.patch
*   ok 7: S = git apply (3)

* expecting success: cat patch1.patch patch4.patch | patch -p1
patching file main.c
patching file main.c
*   ok 8: S = patch (3)

* expecting success: cmp main.c.git main.c
*   ok 9: S = cmp (3)

* passed all 9 test(s)
*** t4110-apply-scan.sh ***
* expecting success: git apply patch1.patch patch2.patch patch3.patch patch4.patch patch5.patch
*   ok 1: S = git apply scan

* expecting success: cat patch1.patch patch2.patch patch3.patch patch4.patch patch5.patch | patch
patching file new.txt
patching file new.txt
patching file new.txt
Hunk #1 succeeded at 2 (offset -4 lines).
patching file new.txt
patching file new.txt
Hunk #1 succeeded at 14 (offset 4 lines).
*   ok 2: S = patch scan

* expecting success: cmp apply.txt patch.txt
*   ok 3: S = cmp

* passed all 3 test(s)
*** t4112-apply-renames.sh ***
* expecting success: git apply --check patch
*   ok 1: check rename/copy patch

* expecting success: git apply --index patch
*   ok 2: apply rename/copy patch

* passed all 2 test(s)
*** t4113-apply-ending.sh ***
* expecting success: git update-index --add file
*   ok 1: setup

* expecting failure: git apply --index test-patch
error: patch failed: file:1
error: file: patch does not apply
*   ok 2: apply at the end

* expecting failure: git apply --index test-patch
error: patch failed: file:1
error: file: patch does not apply
*   ok 3: apply at the beginning

* passed all 3 test(s)
*** t4114-apply-typechange.sh ***
* expecting success: 
	echo "hello world" > foo &&
	echo "hi planet" > bar &&
	git update-index --add foo bar &&
	git commit -m initial &&
	git branch initial &&
	rm -f foo &&
	ln -s bar foo &&
	git update-index foo &&
	git commit -m "foo symlinked to bar" &&
	git branch foo-symlinked-to-bar &&
	rm -f foo &&
	echo "how far is the sun?" > foo &&
	git update-index foo &&
	git commit -m "foo back to file" &&
	git branch foo-back-to-file &&
	rm -f foo &&
	git update-index --remove foo &&
	mkdir foo &&
	echo "if only I knew" > foo/baz &&
	git update-index --add foo/baz &&
	git commit -m "foo becomes a directory" &&
	git branch "foo-becomes-a-directory" &&
	echo "hello world" > foo/baz &&
	git update-index foo/baz &&
	git commit -m "foo/baz is the original foo" &&
	git branch foo-baz-renamed-from-foo
	
Created initial commit 9d21ef9: initial
 2 files changed, 2 insertions(+), 0 deletions(-)
 create mode 100644 bar
 create mode 100644 foo
Created commit 84204ad: foo symlinked to bar
 1 files changed, 1 insertions(+), 1 deletions(-)
 rewrite foo (100%)
 mode change 100644 => 120000
Created commit 4fc1d9e: foo back to file
 1 files changed, 1 insertions(+), 1 deletions(-)
 rewrite foo (100%)
 mode change 120000 => 100644
Created commit 1e7bfcd: foo becomes a directory
 2 files changed, 1 insertions(+), 1 deletions(-)
 delete mode 100644 foo
 create mode 100644 foo/baz
Created commit f38df66: foo/baz is the original foo
 1 files changed, 1 insertions(+), 1 deletions(-)
*   ok 1: setup repository and commits

* expecting success: 
	git checkout -f initial &&
	git diff-tree -M -p HEAD foo-baz-renamed-from-foo > patch &&
	git apply --index < patch
	
Switched to branch "initial"
*   ok 2: file renamed from foo to foo/baz

* expecting success: 
	git checkout -f foo-baz-renamed-from-foo &&
	git diff-tree -M -p HEAD initial > patch &&
	git apply --index < patch
	
Switched to branch "foo-baz-renamed-from-foo"
*   ok 3: file renamed from foo/baz to foo

* expecting success: 
	git checkout -f foo-becomes-a-directory &&
	git diff-tree -p HEAD initial > patch &&
	git apply --index < patch
	
Switched to branch "foo-becomes-a-directory"
*   ok 4: directory becomes file

* expecting success: 
	git checkout -f initial &&
	git diff-tree -p HEAD foo-becomes-a-directory > patch &&
	git apply --index < patch
	
Switched to branch "initial"
*   ok 5: file becomes directory

* expecting success: 
	git checkout -f initial &&
	git diff-tree -p HEAD foo-symlinked-to-bar > patch &&
	git apply --index < patch
	
Already on branch "initial"
*   ok 6: file becomes symlink

* expecting success: 
	git checkout -f foo-symlinked-to-bar &&
	git diff-tree -p HEAD foo-back-to-file > patch &&
	git apply --index < patch
	
Switched to branch "foo-symlinked-to-bar"
*   ok 7: symlink becomes file

* expecting success: 
	git checkout -f foo-symlinked-to-bar &&
	git diff-tree -p HEAD foo-becomes-a-directory > patch &&
	git apply --index < patch
	
Already on branch "foo-symlinked-to-bar"
*   ok 8: symlink becomes directory

* expecting success: 
	git checkout -f foo-becomes-a-directory &&
	git diff-tree -p HEAD foo-symlinked-to-bar > patch &&
	git apply --index < patch
	
Switched to branch "foo-becomes-a-directory"
*   ok 9: directory becomes symlink

* passed all 9 test(s)
*** t4115-apply-symlink.sh ***
* expecting success: 

	ln -s path1/path2/path3/path4/path5 link1 &&
	git add link? &&
	git commit -m initial &&

	git branch side &&

	rm -f link? &&

	ln -s htap6 link1 &&
	git update-index link? &&
	git commit -m second &&

	git diff-tree -p HEAD^ HEAD >patch  &&
	git apply --stat --summary patch


Created initial commit 4b3ec06: initial
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 120000 link1
Created commit 99b7ee5: second
 1 files changed, 1 insertions(+), 1 deletions(-)
 link1 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
*   ok 1: setup

* expecting success: 

	git checkout side &&
	git apply patch &&
	git diff-files -p >patched &&
	git diff patch patched


Switched to branch "side"
*   ok 2: apply symlink patch

* expecting success: 

	git checkout -f side &&
	git apply --index patch &&
	git diff-index --cached -p HEAD >patched &&
	git diff patch patched


Already on branch "side"
*   ok 3: apply --index symlink patch

* passed all 3 test(s)
*** t4116-apply-reverse.sh ***
* expecting success: 

	for i in a b c d e f g h i j k l m n; do echo $i; done >file1 &&
	tr "ijk" '
Created initial commit 9f2dd45: initial
 2 files changed, 14 insertions(+), 0 deletions(-)
 create mode 100644 file1
 create mode 100644 file2
Created commit bd5e5da: second
 2 files changed, 6 insertions(+), 6 deletions(-)
*   ok 1: setup

* expecting success: 

	T0=`git rev-parse "second^{tree}"` &&
	git reset --hard initial &&
	git apply --index --binary patch &&
	T1=`git write-tree` &&
	test "$T0" = "$T1"

HEAD is now at 9f2dd45... initial
*   ok 2: apply in forward

* expecting success: 

	git reset --hard second &&
	git apply --reverse --binary --index patch &&
	git diff >diff &&
	git diff /dev/null diff


HEAD is now at bd5e5da... second
diff --git a/dev/null b/diff
new file mode 100644
index 0000000..e69de29
*   ok 3: apply in reverse

* expecting success: 

	git tar-tree initial initial | tar xf - &&
	(
		cd initial && git init && git add .
	) &&

	git tar-tree second second | tar xf - &&
	(
		cd second && git init && git add .
	)


*** git-tar-tree is now deprecated.
*** Running git-archive instead.
*** 'git-archive' '--format=tar' '--prefix=initial/' 'initial'
Initialized empty Git repository in .git/
*** git-tar-tree is now deprecated.
*** Running git-archive instead.
*** 'git-archive' '--format=tar' '--prefix=second/' 'second'
Initialized empty Git repository in .git/
*   ok 4: setup separate repository lacking postimage

* expecting success: 

	T0=`git rev-parse "second^{tree}"` &&
	(
		cd initial &&
		git apply --index --binary ../patch &&
		T1=`git write-tree` &&
		test "$T0" = "$T1"
	)

*   ok 5: apply in forward without postimage

* expecting success: 

	T0=`git rev-parse "initial^{tree}"` &&
	(
		cd second &&
		git apply --index --binary --reverse ../patch &&
		T1=`git write-tree` &&
		test "$T0" = "$T1"
	)

*   ok 6: apply in reverse without postimage

* expecting success: 
	sed "s/a/a /" < file1 > file1.new &&
	mv file1.new file1 &&
	git diff | git apply --reverse --whitespace=error

*   ok 7: reversing a whitespace introduction

* passed all 7 test(s)
*** t4117-apply-reject.sh ***
* expecting success: 
	for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
	do
		echo $i
	done >file1 &&
	cat file1 >saved.file1 &&
	git update-index --add file1 &&
	git commit -m initial &&

	for i in 1 2 A B 4 5 6 7 8 9 10 11 12 C 13 14 15 16 17 18 19 20 D 21
	do
		echo $i
	done >file1 &&
	git diff >patch.1 &&
	cat file1 >clean &&

	for i in 1 E 2 3 4 5 6 7 8 9 10 11 12 C 13 14 15 16 17 18 19 20 F 21
	do
		echo $i
	done >expected &&

	mv file1 file2 &&
	git update-index --add --remove file1 file2 &&
	git diff -M HEAD >patch.2 &&

	rm -f file1 file2 &&
	mv saved.file1 file1 &&
	git update-index --add --remove file1 file2 &&

	for i in 1 E 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 F 21
	do
		echo $i
	done >file1 &&

	cat file1 >saved.file1

Created initial commit b997301: initial
 1 files changed, 21 insertions(+), 0 deletions(-)
 create mode 100644 file1
*   ok 1: setup

* expecting success: 

	if git apply patch.1
	then
		echo "Eh? Why?"
		exit 1
	fi

	git diff file1 saved.file1

error: patch failed: file1:1
error: file1: patch does not apply
*   ok 2: apply without --reject should fail

* expecting success: 

	if git apply --verbose patch.1
	then
		echo "Eh? Why?"
		exit 1
	fi

	git diff file1 saved.file1

Checking patch file1...
error: while searching for:
1
2
3
4
5
6

error: patch failed: file1:1
error: file1: patch does not apply
*   ok 3: apply without --reject should fail

* expecting success: 

	cat saved.file1 >file1 &&
	rm -f file1.rej file2.rej &&

	if git apply --reject patch.1
	then
		echo "succeeds with --reject?"
		exit 1
	fi

	git diff file1 expected &&

	cat file1.rej &&

	if test -f file2.rej
	then
		echo "file2 should not have been touched"
		exit 1
	fi

Checking patch file1...
error: while searching for:
1
2
3
4
5
6

error: patch failed: file1:1
error: while searching for:
18
19
20
21

error: patch failed: file1:18
Applying patch file1 with 2 rejects...
Rejected hunk #1.
Hunk #2 applied cleanly.
Rejected hunk #3.
diff a/file1 b/file1	(rejected hunks)
@@ -1,6 +1,7 @@
 1
 2
-3
+A
+B
 4
 5
 6
@@ -18,4 +20,5 @@
 18
 19
 20
+D
 21
*   ok 4: apply with --reject should fail but update the file

* expecting success: 

	cat saved.file1 >file1 &&
	rm -f file1.rej file2.rej file2 &&

	if git apply --reject patch.2 >rejects
	then
		echo "succeeds with --reject?"
		exit 1
	fi

	test -f file1 && {
		echo "file1 still exists?"
		exit 1
	}
	git diff file2 expected &&

	cat file2.rej &&

	if test -f file1.rej
	then
		echo "file2 should not have been touched"
		exit 1
	fi


Checking patch file1 => file2...
error: while searching for:
1
2
3
4
5
6

error: patch failed: file1:1
error: while searching for:
18
19
20
21

error: patch failed: file1:18
Applying patch file1 => file2 with 2 rejects...
Rejected hunk #1.
Hunk #2 applied cleanly.
Rejected hunk #3.
diff a/file2 b/file2	(rejected hunks)
@@ -1,6 +1,7 @@
 1
 2
-3
+A
+B
 4
 5
 6
@@ -18,4 +20,5 @@
 18
 19
 20
+D
 21
*   ok 5: apply with --reject should fail but update the file

* expecting success: 

	cat saved.file1 >file1 &&
	rm -f file1.rej file2.rej file2 &&

	if git apply --reject --verbose patch.2 >rejects
	then
		echo "succeeds with --reject?"
		exit 1
	fi

	test -f file1 && {
		echo "file1 still exists?"
		exit 1
	}
	git diff file2 expected &&

	cat file2.rej &&

	if test -f file1.rej
	then
		echo "file2 should not have been touched"
		exit 1
	fi


Checking patch file1 => file2...
error: while searching for:
1
2
3
4
5
6

error: patch failed: file1:1
error: while searching for:
18
19
20
21

error: patch failed: file1:18
Applying patch file1 => file2 with 2 rejects...
Rejected hunk #1.
Hunk #2 applied cleanly.
Rejected hunk #3.
diff a/file2 b/file2	(rejected hunks)
@@ -1,6 +1,7 @@
 1
 2
-3
+A
+B
 4
 5
 6
@@ -18,4 +20,5 @@
 18
 19
 20
+D
 21
*   ok 6: the same test with --verbose

* expecting success: 

	git cat-file -p HEAD:file1 >file1 &&
	rm -f file?.rej file2 &&

	git apply --verbose patch.1 &&

	git diff file1 clean

Checking patch file1...
Applied patch file1 cleanly.
*   ok 7: apply cleanly with --verbose

* passed all 7 test(s)
*** t4118-apply-empty-context.sh ***
* expecting success: 
	{
		echo; echo;
		echo A; echo B; echo C;
		echo;
	} >file1 &&
	cat file1 >file1.orig &&
	{
		cat file1 &&
		echo Q | tr -d "\012"
	} >file2 &&
	cat file2 >file2.orig
	git add file1 file2 &&
	sed -e "/^B/d" <file1.orig >file1 &&
	sed -e "/^[BQ]/d" <file2.orig >file2 &&
	echo Q | tr -d "\012" >>file2 &&
	cat file1 >file1.mods &&
	cat file2 >file2.mods &&
	git diff |
	sed -e "s/^ \$//" >diff.output

*   ok 1: setup

* expecting success: 

	git apply --numstat diff.output >actual &&
	{
		echo "0	1	file1" &&
		echo "0	1	file2"
	} >expect &&
	git diff expect actual


*   ok 2: apply --numstat

* expecting success: 

	cat file1.orig >file1 &&
	cat file2.orig >file2 &&
	git update-index file1 file2 &&
	git apply --index diff.output &&
	git diff file1.mods file1 &&
	git diff file2.mods file2

*   ok 3: apply --apply

* passed all 3 test(s)
*** t4119-apply-config.sh ***
* expecting success: 
	mkdir sub &&
	echo A >sub/file1 &&
	cp sub/file1 saved &&
	git add sub/file1 &&
	echo "B " >sub/file1 &&
	git diff >patch.file

*   ok 1: setup

* expecting success: 

	rm -f sub/file1 &&
	cp saved sub/file1 &&
	git update-index --refresh &&

	git apply --whitespace=strip patch.file &&
	check_result sub/file1

patch.file:7: trailing whitespace.
B 
warning: 1 line applied after fixing whitespace errors.
B
Happy
*   ok 2: apply --whitespace=strip

* expecting success: 

	rm -f sub/file1 &&
	cp saved sub/file1 &&
	git update-index --refresh &&

	git config apply.whitespace strip &&
	git apply patch.file &&
	check_result sub/file1

patch.file:7: trailing whitespace.
B 
warning: 1 line applied after fixing whitespace errors.
B
Happy
*   ok 3: apply --whitespace=strip from config

* expecting success: 

	cd "$D" &&
	git config --unset-all apply.whitespace
	rm -f sub/file1 &&
	cp saved sub/file1 &&
	git update-index --refresh &&

	cd sub &&
	git apply --whitespace=strip ../patch.file &&
	check_result file1

sub/../patch.file:7: trailing whitespace.
B 
warning: 1 line applied after fixing whitespace errors.
B
Happy
*   ok 4: apply --whitespace=strip in subdir

* expecting success: 

	cd "$D" &&
	git config apply.whitespace strip &&
	rm -f sub/file1 &&
	cp saved sub/file1 &&
	git update-index --refresh &&

	cd sub &&
	git apply ../patch.file &&
	check_result file1

sub/../patch.file:7: trailing whitespace.
B 
warning: 1 line applied after fixing whitespace errors.
B
Happy
*   ok 5: apply --whitespace=strip from config in subdir

* expecting success: 

	cd "$D" &&
	git config apply.whitespace strip &&
	rm -f sub/file1 &&
	cp saved sub/file1 &&
	git update-index --refresh &&

	cd sub &&
	git apply ../gpatch.file &&
	check_result file1

sub/../gpatch.file:5: trailing whitespace.
B 
warning: 1 line applied after fixing whitespace errors.
B
Happy
*   ok 6: same in subdir but with traditional patch input

* expecting success: 

	cd "$D" &&
	git config apply.whitespace strip &&
	rm -f sub/file1 &&
	cp saved sub/file1 &&
	git update-index --refresh &&

	cd sub &&
	git apply ../gpatch-sub.file &&
	check_result file1

sub/../gpatch-sub.file:5: trailing whitespace.
B 
warning: 1 line applied after fixing whitespace errors.
B
Happy
*   ok 7: same but with traditional patch input of depth 1

* expecting success: 

	cd "$D" &&
	git config apply.whitespace strip &&
	rm -f sub/file1 &&
	cp saved sub/file1 &&
	git update-index --refresh &&

	cd sub &&
	git apply ../gpatch-ab-sub.file &&
	check_result file1

sub/../gpatch-ab-sub.file:5: trailing whitespace.
B 
warning: 1 line applied after fixing whitespace errors.
B
Happy
*   ok 8: same but with traditional patch input of depth 2

* expecting success: 

	cd "$D" &&
	git config apply.whitespace strip &&
	rm -f sub/file1 &&
	cp saved sub/file1 &&
	git update-index --refresh &&

	git apply -p0 gpatch-sub.file &&
	check_result sub/file1

gpatch-sub.file:5: trailing whitespace.
B 
warning: 1 line applied after fixing whitespace errors.
B
Happy
*   ok 9: same but with traditional patch input of depth 1

* expecting success: 

	cd "$D" &&
	git config apply.whitespace strip &&
	rm -f sub/file1 &&
	cp saved sub/file1 &&
	git update-index --refresh &&

	git apply gpatch-ab-sub.file &&
	check_result sub/file1

gpatch-ab-sub.file:5: trailing whitespace.
B 
warning: 1 line applied after fixing whitespace errors.
B
Happy
*   ok 10: same but with traditional patch input of depth 2

* passed all 10 test(s)
*** t4120-apply-popt.sh ***
* expecting success: 
	mkdir sub &&
	echo A >sub/file1 &&
	cp sub/file1 file1 &&
	git add sub/file1 &&
	echo B >sub/file1 &&
	git diff >patch.file &&
	rm sub/file1 &&
	rmdir sub

*   ok 1: setup

* expecting success: 
	git apply -p2 patch.file

*   ok 2: apply git diff with -p2

* passed all 2 test(s)
*** t4121-apply-diffs.sh ***
* expecting success: git add file &&
	git commit -q -m 1 &&
	git checkout -b test &&
	mv file file.tmp &&
	echo 0 >file &&
	cat file.tmp >>file &&
	rm file.tmp &&
	git commit -a -q -m 2 &&
	echo 9 >>file &&
	git commit -a -q -m 3 &&
	git checkout master
Switched to a new branch "test"
Switched to branch "master"
*   ok 1: setup

* expecting success: ( git diff test~2 test~1; git diff test~1 test~0 )| git apply
*   ok 2: check if contextually independent diffs for the same file apply

* passed all 2 test(s)
*** t4122-apply-symlink-inside.sh ***
* expecting success: 

	mkdir -p arch/i386/boot arch/x86_64 &&
	lecho 1 2 3 4 5 >arch/i386/boot/Makefile &&
	ln -s ../i386/boot arch/x86_64/boot &&
	git add . &&
	test_tick &&
	git commit -m initial &&
	git branch test &&

	rm arch/x86_64/boot &&
	mkdir arch/x86_64/boot &&
	lecho 2 3 4 5 6 >arch/x86_64/boot/Makefile &&
	git add . &&
	test_tick &&
	git commit -a -m second &&

	git format-patch --binary -1 --stdout >test.patch


Created initial commit f9acfaa: initial
 2 files changed, 6 insertions(+), 0 deletions(-)
 create mode 100644 arch/i386/boot/Makefile
 create mode 120000 arch/x86_64/boot
Created commit e8e99d5: second
 2 files changed, 5 insertions(+), 1 deletions(-)
 delete mode 120000 arch/x86_64/boot
 create mode 100644 arch/x86_64/boot/Makefile
*   ok 1: setup

* expecting success: 

	git checkout test &&
	git diff --exit-code test &&
	git diff --exit-code --cached test &&
	git apply --index test.patch


Switched to branch "test"
*   ok 2: apply

* expecting success: 

	git diff --exit-code master &&
	git diff --exit-code --cached master &&
	test_tick &&
	git commit -m replay &&
	T1=$(git rev-parse "master^{tree}") &&
	T2=$(git rev-parse "HEAD^{tree}") &&
	test "z$T1" = "z$T2"


Created commit 66a4bdc: replay
 2 files changed, 5 insertions(+), 1 deletions(-)
 delete mode 120000 arch/x86_64/boot
 create mode 100644 arch/x86_64/boot/Makefile
*   ok 3: check result

* passed all 3 test(s)
*** t4123-apply-shrink.sh ***
* expecting success: 

	git add F &&
	mv F G &&
	sed -e "s/1/11/" -e "s/999999/9/" -e "s/H/HH/" <G >F &&
	git diff >patch &&
	sed -e "/^\$/d" <G >F &&
	git add F


*   ok 1: setup

* expecting success: 

	if git apply --index patch
	then
		echo Oops, should not have succeeded
		false
	else
		status=$?
		echo "Status was $status"
		if test -f .git/index.lock
		then
			echo Oops, should not have crashed
			false
		fi
	fi

error: patch failed: F:14
error: F: patch does not apply
Status was 1
*   ok 2: apply should fail gracefully

* passed all 2 test(s)
*** t4124-apply-ws-rule.sh ***
* expecting success: 

	>file &&
	git add file &&
	prepare_test_file >file &&
	git diff-files -p >patch &&
	>target &&
	git add target


*   ok 1: setup

* expecting success: 

	apply_patch --whitespace=nowarn &&
	diff file target


*   ok 2: whitespace=nowarn, default rule

* expecting success: 

	apply_patch --whitespace=warn &&
	diff file target


<stdin>:8: space before tab in indent.
 	A SP and a HT (@).
<stdin>:9: space before tab in indent.
 	 A SP, a HT and a SP (@).
<stdin>:12: space before tab in indent.
       	Seven SP and a HT (@).
<stdin>:13: space before tab in indent.
        	Eight SP and a HT (@#).
<stdin>:14: space before tab in indent.
       	 Seven SP, a HT and a SP (@).
warning: squelched 5 whitespace errors
warning: 10 lines add whitespace errors.
*   ok 3: whitespace=warn, default rule

* expecting success: 

	apply_patch --whitespace=error-all && return 1
	test -s target && return 1
	: happy


<stdin>:8: space before tab in indent.
 	A SP and a HT (@).
<stdin>:9: space before tab in indent.
 	 A SP, a HT and a SP (@).
<stdin>:12: space before tab in indent.
       	Seven SP and a HT (@).
<stdin>:13: space before tab in indent.
        	Eight SP and a HT (@#).
<stdin>:14: space before tab in indent.
       	 Seven SP, a HT and a SP (@).
<stdin>:15: space before tab in indent.
        	 Eight SP, a HT and a SP (@#).
<stdin>:17: space before tab in indent.
               	Fifteen SP and a HT (@#).
<stdin>:19: space before tab in indent.
                	Sixteen SP and a HT (@#).
<stdin>:21: trailing whitespace.
A line with a (!) trailing SP 
<stdin>:22: trailing whitespace.
A line with a (!) trailing HT	
fatal: 10 lines add whitespace errors.
*   ok 4: whitespace=error-all, default rule

* expecting success: 

	git config core.whitespace -trailing,-space-before,-indent &&
	apply_patch --whitespace=error-all &&
	diff file target


*   ok 5: whitespace=error-all, no rule

* expecting success: 

	git config --unset core.whitespace &&
	echo "target -whitespace" >.gitattributes &&
	apply_patch --whitespace=error-all &&
	diff file target


*   ok 6: whitespace=error-all, no rule (attribute)

* expecting success: 
				git config core.whitespace "$rule" &&
				test_fix "$tt$ts$ti"
			
*   ok 7: rule=-trailing,-space,-indent

* expecting success: 
				git config --unset core.whitespace &&
				echo "target whitespace=$rule" >.gitattributes &&
				test_fix "$tt$ts$ti"
			
*   ok 8: rule=-trailing,-space,-indent (attributes)

* expecting success: 
				git config core.whitespace "$rule" &&
				test_fix "$tt$ts$ti"
			
<stdin>:11: indent with spaces.
        Eight SP (#).
<stdin>:16: indent with spaces.
               Fifteen SP (#).
<stdin>:18: indent with spaces.
                Sixteen SP (#).
warning: 7 lines applied after fixing whitespace errors.
*   ok 9: rule=-trailing,-space,indent

* expecting success: 
				git config --unset core.whitespace &&
				echo "target whitespace=$rule" >.gitattributes &&
				test_fix "$tt$ts$ti"
			
<stdin>:11: indent with spaces.
        Eight SP (#).
<stdin>:16: indent with spaces.
               Fifteen SP (#).
<stdin>:18: indent with spaces.
                Sixteen SP (#).
warning: 7 lines applied after fixing whitespace errors.
*   ok 10: rule=-trailing,-space,indent (attributes)

* expecting success: 
				git config core.whitespace "$rule" &&
				test_fix "$tt$ts$ti"
			
<stdin>:8: space before tab in indent.
 	A SP and a HT (@).
<stdin>:9: space before tab in indent.
 	 A SP, a HT and a SP (@).
<stdin>:12: space before tab in indent.
       	Seven SP and a HT (@).
<stdin>:13: space before tab in indent.
        	Eight SP and a HT (@#).
<stdin>:14: space before tab in indent.
       	 Seven SP, a HT and a SP (@).
warning: squelched 3 whitespace errors
warning: 8 lines applied after fixing whitespace errors.
*   ok 11: rule=-trailing,space,-indent

* expecting success: 
				git config --unset core.whitespace &&
				echo "target whitespace=$rule" >.gitattributes &&
				test_fix "$tt$ts$ti"
			
<stdin>:8: space before tab in indent.
 	A SP and a HT (@).
<stdin>:9: space before tab in indent.
 	 A SP, a HT and a SP (@).
<stdin>:12: space before tab in indent.
       	Seven SP and a HT (@).
<stdin>:13: space before tab in indent.
        	Eight SP and a HT (@#).
<stdin>:14: space before tab in indent.
       	 Seven SP, a HT and a SP (@).
warning: squelched 3 whitespace errors
warning: 8 lines applied after fixing whitespace errors.
*   ok 12: rule=-trailing,space,-indent (attributes)

* expecting success: 
				git config core.whitespace "$rule" &&
				test_fix "$tt$ts$ti"
			
<stdin>:8: space before tab in indent.
 	A SP and a HT (@).
<stdin>:9: space before tab in indent.
 	 A SP, a HT and a SP (@).
<stdin>:11: indent with spaces.
        Eight SP (#).
<stdin>:12: space before tab in indent.
       	Seven SP and a HT (@).
<stdin>:13: space before tab in indent.
        	Eight SP and a HT (@#).
warning: squelched 6 whitespace errors
warning: 11 lines applied after fixing whitespace errors.
*   ok 13: rule=-trailing,space,indent

* expecting success: 
				git config --unset core.whitespace &&
				echo "target whitespace=$rule" >.gitattributes &&
				test_fix "$tt$ts$ti"
			
<stdin>:8: space before tab in indent.
 	A SP and a HT (@).
<stdin>:9: space before tab in indent.
 	 A SP, a HT and a SP (@).
<stdin>:11: indent with spaces.
        Eight SP (#).
<stdin>:12: space before tab in indent.
       	Seven SP and a HT (@).
<stdin>:13: space before tab in indent.
        	Eight SP and a HT (@#).
warning: squelched 6 whitespace errors
warning: 11 lines applied after fixing whitespace errors.
*   ok 14: rule=-trailing,space,indent (attributes)

* expecting success: 
				git config core.whitespace "$rule" &&
				test_fix "$tt$ts$ti"
			
<stdin>:21: trailing whitespace.
A line with a (!) trailing SP 
<stdin>:22: trailing whitespace.
A line with a (!) trailing HT	
warning: 2 lines applied after fixing whitespace errors.
*   ok 15: rule=trailing,-space,-indent

* expecting success: 
				git config --unset core.whitespace &&
				echo "target whitespace=$rule" >.gitattributes &&
				test_fix "$tt$ts$ti"
			
<stdin>:21: trailing whitespace.
A line with a (!) trailing SP 
<stdin>:22: trailing whitespace.
A line with a (!) trailing HT	
warning: 2 lines applied after fixing whitespace errors.
*   ok 16: rule=trailing,-space,-indent (attributes)

* expecting success: 
				git config core.whitespace "$rule" &&
				test_fix "$tt$ts$ti"
			
<stdin>:11: indent with spaces.
        Eight SP (#).
<stdin>:16: indent with spaces.
               Fifteen SP (#).
<stdin>:18: indent with spaces.
                Sixteen SP (#).
<stdin>:21: trailing whitespace.
A line with a (!) trailing SP 
<stdin>:22: trailing whitespace.
A line with a (!) trailing HT	
warning: 9 lines applied after fixing whitespace errors.
*   ok 17: rule=trailing,-space,indent

* expecting success: 
				git config --unset core.whitespace &&
				echo "target whitespace=$rule" >.gitattributes &&
				test_fix "$tt$ts$ti"
			
<stdin>:11: indent with spaces.
        Eight SP (#).
<stdin>:16: indent with spaces.
               Fifteen SP (#).
<stdin>:18: indent with spaces.
                Sixteen SP (#).
<stdin>:21: trailing whitespace.
A line with a (!) trailing SP 
<stdin>:22: trailing whitespace.
A line with a (!) trailing HT	
warning: 9 lines applied after fixing whitespace errors.
*   ok 18: rule=trailing,-space,indent (attributes)

* expecting success: 
				git config core.whitespace "$rule" &&
				test_fix "$tt$ts$ti"
			
<stdin>:8: space before tab in indent.
 	A SP and a HT (@).
<stdin>:9: space before tab in indent.
 	 A SP, a HT and a SP (@).
<stdin>:12: space before tab in indent.
       	Seven SP and a HT (@).
<stdin>:13: space before tab in indent.
        	Eight SP and a HT (@#).
<stdin>:14: space before tab in indent.
       	 Seven SP, a HT and a SP (@).
warning: squelched 5 whitespace errors
warning: 10 lines applied after fixing whitespace errors.
*   ok 19: rule=trailing,space,-indent

* expecting success: 
				git config --unset core.whitespace &&
				echo "target whitespace=$rule" >.gitattributes &&
				test_fix "$tt$ts$ti"
			
<stdin>:8: space before tab in indent.
 	A SP and a HT (@).
<stdin>:9: space before tab in indent.
 	 A SP, a HT and a SP (@).
<stdin>:12: space before tab in indent.
       	Seven SP and a HT (@).
<stdin>:13: space before tab in indent.
        	Eight SP and a HT (@#).
<stdin>:14: space before tab in indent.
       	 Seven SP, a HT and a SP (@).
warning: squelched 5 whitespace errors
warning: 10 lines applied after fixing whitespace errors.
*   ok 20: rule=trailing,space,-indent (attributes)

* expecting success: 
				git config core.whitespace "$rule" &&
				test_fix "$tt$ts$ti"
			
<stdin>:8: space before tab in indent.
 	A SP and a HT (@).
<stdin>:9: space before tab in indent.
 	 A SP, a HT and a SP (@).
<stdin>:11: indent with spaces.
        Eight SP (#).
<stdin>:12: space before tab in indent.
       	Seven SP and a HT (@).
<stdin>:13: space before tab in indent.
        	Eight SP and a HT (@#).
warning: squelched 8 whitespace errors
warning: 13 lines applied after fixing whitespace errors.
*   ok 21: rule=trailing,space,indent

* expecting success: 
				git config --unset core.whitespace &&
				echo "target whitespace=$rule" >.gitattributes &&
				test_fix "$tt$ts$ti"
			
<stdin>:8: space before tab in indent.
 	A SP and a HT (@).
<stdin>:9: space before tab in indent.
 	 A SP, a HT and a SP (@).
<stdin>:11: indent with spaces.
        Eight SP (#).
<stdin>:12: space before tab in indent.
       	Seven SP and a HT (@).
<stdin>:13: space before tab in indent.
        	Eight SP and a HT (@#).
warning: squelched 8 whitespace errors
warning: 13 lines applied after fixing whitespace errors.
*   ok 22: rule=trailing,space,indent (attributes)

* passed all 22 test(s)
*** t4200-rerere.sh ***
Switched to a new branch "first"
Switched to a new branch "second"
* expecting success: 
	(rm -rf .git/rr-cache; git config rerere.enabled false) &&
	! git merge first &&
	! test -d .git/rr-cache

Merging HEAD with first
Merging:
64e7490 second
ccf559e first
found 1 common ancestor(s):
dfdd722 initial
Auto-merged a1
CONFLICT (content): Merge conflict in a1
Automatic merge failed; fix conflicts and then commit the result.
*   ok 1: nothing recorded without rerere

* expecting success: 
	git reset --hard &&
	mkdir .git/rr-cache &&
	git config --unset rerere.enabled &&
	! git merge first

HEAD is now at 64e7490... second
Merging HEAD with first
Merging:
64e7490 second
ccf559e first
found 1 common ancestor(s):
dfdd722 initial
Auto-merged a1
CONFLICT (content): Merge conflict in a1
Recorded preimage for 'a1'
Automatic merge failed; fix conflicts and then commit the result.
*   ok 2: conflicting merge

* expecting success: grep ======= .git/rr-cache/08f6c39f296af7e0dd1b3b7d8bba18d0365f605f/preimage
=======
=======
*   ok 3: recorded preimage

* expecting success: 
	rm -rf .git/rr-cache &&
	git config rerere.enabled true &&
	git reset --hard &&
	! git merge first &&
	grep ======= $rr/preimage

HEAD is now at 64e7490... second
Merging HEAD with first
Merging:
64e7490 second
ccf559e first
found 1 common ancestor(s):
dfdd722 initial
Auto-merged a1
CONFLICT (content): Merge conflict in a1
Recorded preimage for 'a1'
Automatic merge failed; fix conflicts and then commit the result.
=======
=======
*   ok 4: rerere.enabled works, too

* expecting success: test ! -f .git/rr-cache/08f6c39f296af7e0dd1b3b7d8bba18d0365f605f/postimage -a ! -f .git/rr-cache/08f6c39f296af7e0dd1b3b7d8bba18d0365f605f/thisimage
*   ok 5: no postimage or thisimage yet

* expecting success: 

	cnt=$(sed -ne "/^<<<<<<</,/^>>>>>>>/p" $rr/preimage | wc -l) &&
	test $cnt = 9


*   ok 6: preimage has right number of lines

* expecting success: git diff expect out
*   ok 7: rerere diff

* expecting success: git diff expect out
*   ok 8: rerere status

* expecting success: git commit -q -a -m 'prefer first over second'
Recorded resolution for 'a1'.
*   ok 9: commit succeeds

* expecting success: test -f .git/rr-cache/08f6c39f296af7e0dd1b3b7d8bba18d0365f605f/postimage
*   ok 10: recorded postimage

* expecting success: 
	git checkout -b third master &&
	git show second^:a1 | sed "s/To die: t/To die! T/" > a1 &&
	git commit -q -a -m third &&
	! git pull . first

Switched to a new branch "third"
Merging HEAD with ccf559e20708095943f309cd744df533d83d469d
Merging:
7f4184f third
ccf559e first
found 1 common ancestor(s):
dfdd722 initial
Auto-merged a1
CONFLICT (content): Merge conflict in a1
Resolved 'a1' using previous resolution.
Automatic merge failed; fix conflicts and then commit the result.
*   ok 11: another conflicting merge

* expecting success: ! grep ======= a1
*   ok 12: rerere kicked in

* expecting success: git diff a1 expect
*   ok 13: rerere prefers first change

* expecting success: git rerere clear
*   ok 14: rerere clear

* expecting success: test ! -d .git/rr-cache/08f6c39f296af7e0dd1b3b7d8bba18d0365f605f
*   ok 15: clear removed the directory

* expecting success: git rerere gc
*   ok 16: garbage collection (part1)

* expecting success: test -f .git/rr-cache/08f6c39f296af7e0dd1b3b7d8bba18d0365f605f/preimage && test -f .git/rr-cache/4000000000000000000000000000000000000000/preimage
*   ok 17: young records still live

* expecting success: git rerere gc
*   ok 18: garbage collection (part2)

* expecting success: test ! -f .git/rr-cache/08f6c39f296af7e0dd1b3b7d8bba18d0365f605f/preimage && test ! -f .git/rr-cache/4000000000000000000000000000000000000000/preimage
*   ok 19: old records rest in peace

* expecting success: 
	git reset --hard &&
	git checkout -b fourth &&
	echo Hallo > file2 &&
	git add file2 &&
	git commit -m version1 &&
	git checkout third &&
	echo Bello > file2 &&
	git add file2 &&
	git commit -m version2 &&
	! git merge fourth &&
	sha1=$(sed -e "s/	.*//" .git/rr-cache/MERGE_RR) &&
	rr=.git/rr-cache/$sha1 &&
	echo Cello > file2 &&
	git add file2 &&
	git commit -m resolution

HEAD is now at 7f4184f... third
Switched to a new branch "fourth"
Created commit 2ed8f0a: version1
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 file2
Switched to branch "third"
Created commit f3429d3: version2
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 file2
Merging HEAD with fourth
Merging:
f3429d3 version2
2ed8f0a version1
found 1 common ancestor(s):
7f4184f third
Auto-merged file2
CONFLICT (add/add): Merge conflict in file2
Recorded preimage for 'file2'
Automatic merge failed; fix conflicts and then commit the result.
Recorded resolution for 'file2'.
Created commit 6096f37: resolution
*   ok 20: file2 added differently in two branches

* expecting success: 
	git reset --hard HEAD~2 &&
	git checkout -b fifth &&
	echo Hallo > file3 &&
	git add file3 &&
	git commit -m version1 &&
	git checkout third &&
	echo Bello > file3 &&
	git add file3 &&
	git commit -m version2 &&
	! git merge fifth &&
	git diff-files -q &&
	test Cello = "$(cat file3)"

HEAD is now at 7f4184f... third
Switched to a new branch "fifth"
Created commit 92c68bc: version1
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 file3
Switched to branch "third"
Created commit 1c8caaa: version2
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 file3
Merging HEAD with fifth
Merging:
1c8caaa version2
92c68bc version1
found 1 common ancestor(s):
7f4184f third
Auto-merged file3
CONFLICT (add/add): Merge conflict in file3
Resolved 'file3' using previous resolution.
Automatic merge failed; fix conflicts and then commit the result.
:000000 000000 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 U	file3
:100644 100644 391862e3ac452f4caa020cd1a78312042efd4679 0000000000000000000000000000000000000000 M	file3
*   ok 21: resolution was recorded properly

* passed all 21 test(s)
*** t4201-shortlog.sh ***
* expecting success: diff -u expect out
*   ok 1: shortlog wrapping

* passed all 1 test(s)
*** t4202-log.sh ***
* expecting success: 

	echo one >one &&
	git add one &&
	test_tick &&
	git commit -m initial &&

	echo ichi >one &&
	git add one &&
	test_tick &&
	git commit -m second &&

	mkdir a &&
	echo ni >a/two &&
	git add a/two &&
	test_tick &&
	git commit -m third &&

	echo san >a/three &&
	git add a/three &&
	test_tick &&
	git commit -m fourth &&

	git rm a/three &&
	test_tick &&
	git commit -m fifth


Created initial commit 3a2fdcb: initial
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 one
Created commit f7dab8e: second
 1 files changed, 1 insertions(+), 1 deletions(-)
Created commit 1c37cf7: third
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 a/two
Created commit de5bac7: fourth
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 a/three
rm 'a/three'
Created commit 89a75af: fifth
 1 files changed, 0 insertions(+), 1 deletions(-)
 delete mode 100644 a/three
*   ok 1: setup

* expecting success: 

	actual=$(git log --pretty="format:%s" --diff-filter=A HEAD) &&
	expect=$(echo fourth ; echo third ; echo initial) &&
	test "$actual" = "$expect" || {
		echo Oops
		echo "Actual: $actual"
		false
	}


*   ok 2: diff-filter=A

* expecting success: 

	actual=$(git log --pretty="format:%s" --diff-filter=M HEAD) &&
	expect=$(echo second) &&
	test "$actual" = "$expect" || {
		echo Oops
		echo "Actual: $actual"
		false
	}


*   ok 3: diff-filter=M

* expecting success: 

	actual=$(git log --pretty="format:%s" --diff-filter=D HEAD) &&
	expect=$(echo fifth) &&
	test "$actual" = "$expect" || {
		echo Oops
		echo "Actual: $actual"
		false
	}


*   ok 4: diff-filter=D

* passed all 4 test(s)
*** t5000-tar-tree.sh ***
* expecting success: mkdir a b c &&
     echo simple textfile >a/a &&
     mkdir a/bin &&
     cp /bin/sh a/bin &&
     printf "A\$Format:%s\$O" "$SUBSTFORMAT" >a/substfile1 &&
     printf "A not substituted O" >a/substfile2 &&
     ln -s a a/l1 &&
     (p=long_path_to_a_file && cd a &&
      for depth in 1 2 3 4 5; do mkdir $p && cd $p; done &&
      echo text >file_with_long_path) &&
     (cd a && find .) | sort >a.lst
*   ok 1: populate workdir

* expecting success: find a -type f | xargs git update-index --add &&
     find a -type l | xargs git update-index --add &&
     treeid=`git write-tree` &&
     echo $treeid >treeid &&
     git update-ref HEAD $(TZ=GMT GIT_COMMITTER_DATE="2005-05-27 22:00:00" \
     git commit-tree $treeid </dev/null)
*   ok 2: add files to repository

* expecting success: git archive HEAD >b.tar
*   ok 3: git archive

* expecting success: git tar-tree HEAD >b2.tar
*** git-tar-tree is now deprecated.
*** Running git-archive instead.
*** 'git-archive' '--format=tar' 'HEAD'
*   ok 4: git tar-tree

* expecting success: diff b.tar b2.tar
*   ok 5: git archive vs. git tar-tree

* expecting success: TZ=GMT $TAR tvf b.tar a/a |
     awk \{print\ \$4,\ \(length\(\$5\)\<7\)\ ?\ \$5\":00\"\ :\ \$5\} \
     >b.mtime &&
     echo "2005-05-27 22:00:00" >expected.mtime &&
     diff expected.mtime b.mtime
*   ok 6: validate file modification time

* expecting success: git get-tar-commit-id <b.tar >b.commitid &&
     diff .git/$(git symbolic-ref HEAD) b.commitid
*   ok 7: git get-tar-commit-id

* expecting success: (cd b && $TAR xf -) <b.tar
*   ok 8: extract tar archive

* expecting success: (cd b/a && find .) | sort >b.lst &&
     diff a.lst b.lst
*   ok 9: validate filenames

* expecting success: diff -r a b/a
*   ok 10: validate file contents

* expecting success: git tar-tree HEAD prefix >c.tar
*** git-tar-tree is now deprecated.
*** Running git-archive instead.
*** 'git-archive' '--format=tar' '--prefix=prefix/' 'HEAD'
*   ok 11: git tar-tree with prefix

* expecting success: (cd c && $TAR xf -) <c.tar
*   ok 12: extract tar archive with prefix

* expecting success: (cd c/prefix/a && find .) | sort >c.lst &&
     diff a.lst c.lst
*   ok 13: validate filenames with prefix

* expecting success: diff -r a c/prefix/a
*   ok 14: validate file contents with prefix

* expecting success: echo "substfile?" export-subst >a/.gitattributes &&
     git archive HEAD >f.tar &&
     rm a/.gitattributes
*   ok 15: create an archive with a substfiles

* expecting success: (mkdir f && cd f && $TAR xf -) <f.tar
*   ok 16: extract substfiles

* expecting success: git log --max-count=1 "--pretty=format:A${SUBSTFORMAT}O" HEAD \
      >f/a/substfile1.expected &&
      diff f/a/substfile1.expected f/a/substfile1 &&
      diff a/substfile2 f/a/substfile2

*   ok 17: validate substfile contents

* expecting success: git archive --format=zip HEAD >d.zip
*   ok 18: git archive --format=zip

* expecting success: (mkdir d && cd d && $UNZIP ../d.zip)
Archive:  ../d.zip
8c8413a82a1027dd17a7683ba44ef6ab8667c33e
   creating: a/
 extracting: a/a                     
   creating: a/bin/
  inflating: a/bin/sh                
    linking: a/l1                    -> a 
   creating: a/long_path_to_a_file/
   creating: a/long_path_to_a_file/long_path_to_a_file/
   creating: a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/
   creating: a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/
   creating: a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/
 extracting: a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/file_with_long_path  
 extracting: a/substfile1            
 extracting: a/substfile2            
finishing deferred symbolic links:
  a/l1                   -> a
*   ok 19: extract ZIP archive

* expecting success: (cd d/a && find .) | sort >d.lst &&
     diff a.lst d.lst
*   ok 20: validate filenames

* expecting success: diff -r a d/a
*   ok 21: validate file contents

* expecting success: git archive --format=zip --prefix=prefix/ HEAD >e.zip
*   ok 22: git archive --format=zip with prefix

* expecting success: (mkdir e && cd e && $UNZIP ../e.zip)
Archive:  ../e.zip
8c8413a82a1027dd17a7683ba44ef6ab8667c33e
   creating: prefix/
   creating: prefix/a/
 extracting: prefix/a/a              
   creating: prefix/a/bin/
  inflating: prefix/a/bin/sh         
    linking: prefix/a/l1             -> a 
   creating: prefix/a/long_path_to_a_file/
   creating: prefix/a/long_path_to_a_file/long_path_to_a_file/
   creating: prefix/a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/
   creating: prefix/a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/
   creating: prefix/a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/
 extracting: prefix/a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/file_with_long_path  
 extracting: prefix/a/substfile1     
 extracting: prefix/a/substfile2     
finishing deferred symbolic links:
  prefix/a/l1            -> a
*   ok 23: extract ZIP archive with prefix

* expecting success: (cd e/prefix/a && find .) | sort >e.lst &&
     diff a.lst e.lst
*   ok 24: validate filenames with prefix

* expecting success: diff -r a e/prefix/a
*   ok 25: validate file contents with prefix

* expecting success: GIT_DIR=some/non-existing/directory git archive --list
tar
zip
*   ok 26: git archive --list outside of a git repo

* passed all 26 test(s)
*** t5100-mailinfo.sh ***
* expecting success: git mailsplit -o. ../t5100/sample.mbox >last &&
	last=`cat last` &&
	echo total is $last &&
	test `cat last` = 9
total is 9
*   ok 1: split sample box

* expecting success: git mailinfo -u msg0001 patch0001 <0001 >info0001 &&
		echo msg &&
		diff ../t5100/msg0001 msg0001 &&
		echo patch &&
		diff ../t5100/patch0001 patch0001 &&
		echo info &&
		diff ../t5100/info0001 info0001
msg
patch
info
*   ok 2: mailinfo 0001

* expecting success: git mailinfo -u msg0002 patch0002 <0002 >info0002 &&
		echo msg &&
		diff ../t5100/msg0002 msg0002 &&
		echo patch &&
		diff ../t5100/patch0002 patch0002 &&
		echo info &&
		diff ../t5100/info0002 info0002
msg
patch
info
*   ok 3: mailinfo 0002

* expecting success: git mailinfo -u msg0003 patch0003 <0003 >info0003 &&
		echo msg &&
		diff ../t5100/msg0003 msg0003 &&
		echo patch &&
		diff ../t5100/patch0003 patch0003 &&
		echo info &&
		diff ../t5100/info0003 info0003
msg
patch
info
*   ok 4: mailinfo 0003

* expecting success: git mailinfo -u msg0004 patch0004 <0004 >info0004 &&
		echo msg &&
		diff ../t5100/msg0004 msg0004 &&
		echo patch &&
		diff ../t5100/patch0004 patch0004 &&
		echo info &&
		diff ../t5100/info0004 info0004
msg
patch
info
*   ok 5: mailinfo 0004

* expecting success: git mailinfo -u msg0005 patch0005 <0005 >info0005 &&
		echo msg &&
		diff ../t5100/msg0005 msg0005 &&
		echo patch &&
		diff ../t5100/patch0005 patch0005 &&
		echo info &&
		diff ../t5100/info0005 info0005
msg
patch
info
*   ok 6: mailinfo 0005

* expecting success: git mailinfo -u msg0006 patch0006 <0006 >info0006 &&
		echo msg &&
		diff ../t5100/msg0006 msg0006 &&
		echo patch &&
		diff ../t5100/patch0006 patch0006 &&
		echo info &&
		diff ../t5100/info0006 info0006
msg
patch
info
*   ok 7: mailinfo 0006

* expecting success: git mailinfo -u msg0007 patch0007 <0007 >info0007 &&
		echo msg &&
		diff ../t5100/msg0007 msg0007 &&
		echo patch &&
		diff ../t5100/patch0007 patch0007 &&
		echo info &&
		diff ../t5100/info0007 info0007
msg
patch
info
*   ok 8: mailinfo 0007

* expecting success: git mailinfo -u msg0008 patch0008 <0008 >info0008 &&
		echo msg &&
		diff ../t5100/msg0008 msg0008 &&
		echo patch &&
		diff ../t5100/patch0008 patch0008 &&
		echo info &&
		diff ../t5100/info0008 info0008
msg
patch
info
*   ok 9: mailinfo 0008

* expecting success: git mailinfo -u msg0009 patch0009 <0009 >info0009 &&
		echo msg &&
		diff ../t5100/msg0009 msg0009 &&
		echo patch &&
		diff ../t5100/patch0009 patch0009 &&
		echo info &&
		diff ../t5100/info0009 info0009
msg
patch
info
*   ok 10: mailinfo 0009

* passed all 10 test(s)
*** t5300-pack-object.sh ***
* expecting success: rm -f .git/index*
     for i in a b c
     do
	     dd if=/dev/zero bs=4k count=1 | tr "\000" $i >$i &&
	     git update-index --add $i || return 1
     done &&
     cat c >d && echo foo >>d && git update-index --add d &&
     tree=`git write-tree` &&
     commit=`git commit-tree $tree </dev/null` && {
	 echo $tree &&
	 echo $commit &&
	 git ls-tree $tree | sed -e "s/.* \([0-9a-f]*\)	.*/\1/"
     } >obj-list && {
	 git diff-tree --root -p $commit &&
	 while read object
	 do
	    t=`git cat-file -t $object` &&
	    git cat-file $t $object || return 1
	 done <obj-list
     } >expect
1+0 records in
1+0 records out
4096 bytes (4.1 kB) copied, 2.7e-05 s, 152 MB/s
1+0 records in
1+0 records out
4096 bytes (4.1 kB) copied, 4.5e-05 s, 91.0 MB/s
1+0 records in
1+0 records out
4096 bytes (4.1 kB) copied, 2.7e-05 s, 152 MB/s
*   ok 1: setup

* expecting success: packname_1=$(git pack-objects --window=0 test-1 <obj-list)
*   ok 2: pack without delta

* expecting success: GIT_OBJECT_DIRECTORY=.git2/objects &&
     export GIT_OBJECT_DIRECTORY &&
     git init &&
     git unpack-objects -n <test-1-09776511b6b1093310abfda61fc8b308d7276ccd.pack &&
     git unpack-objects <test-1-09776511b6b1093310abfda61fc8b308d7276ccd.pack
Initialized empty Git repository in .git/
*   ok 3: unpack without delta

* expecting success: (cd ../.git && find objects -type f -print) |
     while read path
     do
         cmp $path ../.git/$path || {
	     echo $path differs.
	     return 1
	 }
     done
*   ok 4: check unpack without delta

* expecting success: pwd &&
     packname_2=$(git pack-objects test-2 <obj-list)
/build/buildd/git-core-1.5.4.3/t/trash
*   ok 5: pack with REF_DELTA

* expecting success: GIT_OBJECT_DIRECTORY=.git2/objects &&
     export GIT_OBJECT_DIRECTORY &&
     git init &&
     git unpack-objects -n <test-2-${packname_2}.pack &&
     git unpack-objects <test-2-${packname_2}.pack
Initialized empty Git repository in .git/
*   ok 6: unpack with REF_DELTA

* expecting success: (cd ../.git && find objects -type f -print) |
     while read path
     do
         cmp $path ../.git/$path || {
	     echo $path differs.
	     return 1
	 }
     done
*   ok 7: check unpack with REF_DELTA

* expecting success: pwd &&
     packname_3=$(git pack-objects --delta-base-offset test-3 <obj-list)
/build/buildd/git-core-1.5.4.3/t/trash
*   ok 8: pack with OFS_DELTA

* expecting success: GIT_OBJECT_DIRECTORY=.git2/objects &&
     export GIT_OBJECT_DIRECTORY &&
     git init &&
     git unpack-objects -n <test-3-${packname_3}.pack &&
     git unpack-objects <test-3-${packname_3}.pack
Initialized empty Git repository in .git/
*   ok 9: unpack with OFS_DELTA

* expecting success: (cd ../.git && find objects -type f -print) |
     while read path
     do
         cmp $path ../.git/$path || {
	     echo $path differs.
	     return 1
	 }
     done
*   ok 10: check unpack with OFS_DELTA

* expecting success: 
	perl -e '
		defined($_ = -s $_) or die for @ARGV;
		exit 1 if $ARGV[0] <= $ARGV[1];
	' test-2-$packname_2.pack test-3-$packname_3.pack

*   ok 11: compare delta flavors

* expecting success: GIT_OBJECT_DIRECTORY=.git2/objects &&
     export GIT_OBJECT_DIRECTORY &&
     git init &&
     cp test-1-${packname_1}.pack test-1-${packname_1}.idx .git2/objects/pack && {
	 git diff-tree --root -p $commit &&
	 while read object
	 do
	    t=`git cat-file -t $object` &&
	    git cat-file $t $object || return 1
	 done <obj-list
    } >current &&
    diff expect current
Initialized empty Git repository in .git/
*   ok 12: use packed objects

* expecting success: GIT_OBJECT_DIRECTORY=.git2/objects &&
     export GIT_OBJECT_DIRECTORY &&
     rm -f .git2/objects/pack/test-* &&
     cp test-2-${packname_2}.pack test-2-${packname_2}.idx .git2/objects/pack && {
	 git diff-tree --root -p $commit &&
	 while read object
	 do
	    t=`git cat-file -t $object` &&
	    git cat-file $t $object || return 1
	 done <obj-list
    } >current &&
    diff expect current
*   ok 13: use packed deltified (REF_DELTA) objects

* expecting success: GIT_OBJECT_DIRECTORY=.git2/objects &&
     export GIT_OBJECT_DIRECTORY &&
     rm -f .git2/objects/pack/test-* &&
     cp test-3-${packname_3}.pack test-3-${packname_3}.idx .git2/objects/pack && {
	 git diff-tree --root -p $commit &&
	 while read object
	 do
	    t=`git cat-file -t $object` &&
	    git cat-file $t $object || return 1
	 done <obj-list
    } >current &&
    diff expect current
*   ok 14: use packed deltified (OFS_DELTA) objects

* expecting success: git verify-pack	test-1-${packname_1}.idx \
			test-2-${packname_2}.idx \
			test-3-${packname_3}.idx
*   ok 15: verify pack

* expecting success: cat test-1-${packname_1}.idx >test-3.idx &&
     cat test-2-${packname_2}.pack >test-3.pack &&
     if git verify-pack test-3.idx
     then false
     else :;
     fi
error: packfile test-3.pack does not match index
fatal: packfile test-3.pack cannot be accessed
*   ok 16: verify-pack catches mismatched .idx and .pack files

* expecting success: cat test-1-${packname_1}.pack >test-3.pack &&
     dd if=/dev/zero of=test-3.pack count=1 bs=1 conv=notrunc seek=2 &&
     if git verify-pack test-3.idx
     then false
     else :;
     fi
1+0 records in
1+0 records out
1 byte (1 B) copied, 2.9e-05 s, 34.5 kB/s
error: file test-3.pack is not a GIT packfile
fatal: packfile test-3.pack cannot be accessed
*   ok 17: verify-pack catches a corrupted pack signature

* expecting success: cat test-1-${packname_1}.pack >test-3.pack &&
     dd if=/dev/zero of=test-3.pack count=1 bs=1 conv=notrunc seek=7 &&
     if git verify-pack test-3.idx
     then false
     else :;
     fi
1+0 records in
1+0 records out
1 byte (1 B) copied, 2.9e-05 s, 34.5 kB/s
error: packfile test-3.pack is version 0 and not supported (try upgrading GIT to a newer version)
fatal: packfile test-3.pack cannot be accessed
*   ok 18: verify-pack catches a corrupted pack version

* expecting success: cat test-1-${packname_1}.pack >test-3.pack &&
     dd if=/dev/zero of=test-3.pack count=1 bs=1 conv=notrunc seek=12 &&
     if git verify-pack test-3.idx
     then false
     else :;
     fi
1+0 records in
1+0 records out
1 byte (1 B) copied, 2.7e-05 s, 37.0 kB/s
error: Packfile test-3.pack SHA1 mismatch with itself
*   ok 19: verify-pack catches a corrupted type/size of the 1st packed object data

* expecting success: l=`wc -c <test-3.idx` &&
     l=`expr $l - 20` &&
     cat test-1-${packname_1}.pack >test-3.pack &&
     dd if=/dev/zero of=test-3.idx count=20 bs=1 conv=notrunc seek=$l &&
     if git verify-pack test-3.pack
     then false
     else :;
     fi
20+0 records in
20+0 records out
20 bytes (20 B) copied, 8.2e-05 s, 244 kB/s
error: Packfile index for test-3.pack SHA1 mismatch
*   ok 20: verify-pack catches a corrupted sum of the index file itself

* expecting success: cat test-1-${packname_1}.pack >test-3.pack &&
     git-index-pack -o tmp.idx test-3.pack &&
     cmp tmp.idx test-1-${packname_1}.idx &&

     git-index-pack test-3.pack &&
     cmp test-3.idx test-1-${packname_1}.idx &&

     cat test-2-${packname_2}.pack >test-3.pack &&
     git-index-pack -o tmp.idx test-2-${packname_2}.pack &&
     cmp tmp.idx test-2-${packname_2}.idx &&

     git-index-pack test-3.pack &&
     cmp test-3.idx test-2-${packname_2}.idx &&

     cat test-3-${packname_3}.pack >test-3.pack &&
     git-index-pack -o tmp.idx test-3-${packname_3}.pack &&
     cmp tmp.idx test-3-${packname_3}.idx &&

     git-index-pack test-3.pack &&
     cmp test-3.idx test-3-${packname_3}.idx &&

     :
09776511b6b1093310abfda61fc8b308d7276ccd
09776511b6b1093310abfda61fc8b308d7276ccd
09776511b6b1093310abfda61fc8b308d7276ccd
09776511b6b1093310abfda61fc8b308d7276ccd
09776511b6b1093310abfda61fc8b308d7276ccd
09776511b6b1093310abfda61fc8b308d7276ccd
*   ok 21: build pack index for an existing pack

* expecting success: test -f	.git/objects/c8/2de19312b6c3695c0c18f70709a6c535682a67 &&
     cp -f	.git/objects/9d/235ed07cd19811a6ceb342de82f190e49c9f68 \
		.git/objects/c8/2de19312b6c3695c0c18f70709a6c535682a67
*   ok 22: fake a SHA1 hash collision

* expecting failure: git-index-pack -o bad.idx test-3.pack
fatal: SHA1 COLLISION FOUND WITH c82de19312b6c3695c0c18f70709a6c535682a67 !
*   ok 23: make sure index-pack detects the SHA1 collision

* passed all 23 test(s)
*** t5301-sliding-window.sh ***
* expecting success: rm -f .git/index*
     for i in a b c
     do
         echo $i >$i &&
         test-genrandom "$i" 32768 >>$i &&
         git update-index --add $i || return 1
     done &&
     echo d >d && cat c >>d && git update-index --add d &&
     tree=`git write-tree` &&
     commit1=`git commit-tree $tree </dev/null` &&
     git update-ref HEAD $commit1 &&
     git-repack -a -d &&
     test "`git count-objects`" = "0 objects, 0 kilobytes" &&
     pack1=`ls .git/objects/pack/*.pack` &&
     test -f "$pack1"
*   ok 1: setup

* expecting success: git verify-pack -v "$pack1"
433aefbda8755b0f539bb6e41912e6f2c232f84e commit 163 12
556c804eac998cc8fa89f225a29870c3d873477b blob   10 98619 1 f76f6b9f6aed8209a40d300bf7dcb4fcf9863531
7c0c57f15aee3c4cbe243c44d3c01ecfa949bb25 blob   32770 33039
b7fabea4d93049ea90d45d8252b9a4f8ee7c9c2c tree   116 135
d67b2ae81f0bd18212d239b6a965711041f73739 blob   32770 250
f76f6b9f6aed8209a40d300bf7dcb4fcf9863531 blob   32772 65828
chain length = 1: 1 object
.git/objects/pack/pack-52fe5ef3498e9dbec5d31aed73568bbbb61fc27c.pack: ok
*   ok 2: verify-pack -v, defaults

* expecting success: git config core.packedGitWindowSize 512 &&
     git verify-pack -v "$pack1"
433aefbda8755b0f539bb6e41912e6f2c232f84e commit 163 12
556c804eac998cc8fa89f225a29870c3d873477b blob   10 98619 1 f76f6b9f6aed8209a40d300bf7dcb4fcf9863531
7c0c57f15aee3c4cbe243c44d3c01ecfa949bb25 blob   32770 33039
b7fabea4d93049ea90d45d8252b9a4f8ee7c9c2c tree   116 135
d67b2ae81f0bd18212d239b6a965711041f73739 blob   32770 250
f76f6b9f6aed8209a40d300bf7dcb4fcf9863531 blob   32772 65828
chain length = 1: 1 object
.git/objects/pack/pack-52fe5ef3498e9dbec5d31aed73568bbbb61fc27c.pack: ok
*   ok 3: verify-pack -v, packedGitWindowSize == 1 page

* expecting success: git config core.packedGitWindowSize 512 &&
     git config core.packedGitLimit 512 &&
     git verify-pack -v "$pack1"
433aefbda8755b0f539bb6e41912e6f2c232f84e commit 163 12
556c804eac998cc8fa89f225a29870c3d873477b blob   10 98619 1 f76f6b9f6aed8209a40d300bf7dcb4fcf9863531
7c0c57f15aee3c4cbe243c44d3c01ecfa949bb25 blob   32770 33039
b7fabea4d93049ea90d45d8252b9a4f8ee7c9c2c tree   116 135
d67b2ae81f0bd18212d239b6a965711041f73739 blob   32770 250
f76f6b9f6aed8209a40d300bf7dcb4fcf9863531 blob   32772 65828
chain length = 1: 1 object
.git/objects/pack/pack-52fe5ef3498e9dbec5d31aed73568bbbb61fc27c.pack: ok
*   ok 4: verify-pack -v, packedGit{WindowSize,Limit} == 1 page

* expecting success: git config core.packedGitWindowSize 512 &&
     git config core.packedGitLimit 512 &&
     commit2=`git commit-tree $tree -p $commit1 </dev/null` &&
     git update-ref HEAD $commit2 &&
     git-repack -a -d &&
     test "`git count-objects`" = "0 objects, 0 kilobytes" &&
     pack2=`ls .git/objects/pack/*.pack` &&
     test -f "$pack2"
     test "$pack1" \!= "$pack2"
*   ok 5: repack -a -d, packedGit{WindowSize,Limit} == 1 page

* expecting success: git config --unset core.packedGitWindowSize &&
     git config --unset core.packedGitLimit &&
     git verify-pack -v "$pack2"
433aefbda8755b0f539bb6e41912e6f2c232f84e commit 9 165 1 44c765be3671fb1d1b60918e0f88dea4b68589f3
44c765be3671fb1d1b60918e0f88dea4b68589f3 commit 211 12
556c804eac998cc8fa89f225a29870c3d873477b blob   10 98687 1 f76f6b9f6aed8209a40d300bf7dcb4fcf9863531
7c0c57f15aee3c4cbe243c44d3c01ecfa949bb25 blob   32770 33107
b7fabea4d93049ea90d45d8252b9a4f8ee7c9c2c tree   116 203
d67b2ae81f0bd18212d239b6a965711041f73739 blob   32770 318
f76f6b9f6aed8209a40d300bf7dcb4fcf9863531 blob   32772 65896
chain length = 1: 2 objects
.git/objects/pack/pack-ea910adb990471f7260aa5a8575e0de3ffeaecc6.pack: ok
*   ok 6: verify-pack -v, defaults

* passed all 6 test(s)
*** t5302-pack-index.sh ***
* expecting success: rm -rf .git
     git init &&
     i=1 &&
	 while test $i -le 100
     do
		 i=`printf %03i $i`
         echo $i >file_$i &&
         test-genrandom "$i" 8192 >>file_$i &&
         git update-index --add file_$i &&
		 i=`expr $i + 1` || return 1
     done &&
     { echo 101 && test-genrandom 100 8192; } >file_101 &&
     git update-index --add file_101 &&
     tree=`git write-tree` &&
     commit=`git commit-tree $tree </dev/null` && {
	 echo $tree &&
	 git ls-tree $tree | sed -e "s/.* \([0-9a-f]*\)	.*/\1/"
     } >obj-list &&
     git update-ref HEAD $commit
Initialized empty Git repository in .git/
*   ok 1: setup

* expecting success: pack1=$(git pack-objects --index-version=1 test-1 <obj-list) &&
     git verify-pack -v "test-1-${pack1}.pack"
01179d82b18c252824e20e190543e0e84950d820 blob   8196 183077
03a6f56dbbb556425ef8c43c31519b32eb5629a4 blob   8196 355487
0471b3b8ab8da19f3968dc238e9555f4e48ce858 blob   8196 18877
0508b858e01f0367552fb14722388ba48dbd36f7 blob   8196 51717
08a8cf223e5dc57504da3cd8eb56d33f276dc1b9 blob   8196 568947
09ba511a995b8ea75067036d5c046f39052a3bd8 blob   8196 92767
0b968294884af115eb5a1b941b3dabd48470c3bb blob   12 823457 1 3927444e44b49dfa6cdc768298ae879ec298c45d
0d6e5c0388744cf82463ce1283ff99e863e9b26e blob   8196 634627
10f7133774acbc162f5f79804744d64747eee380 blob   8196 552527
1297547aab30f952af805d38f6f1c1930cb3117b blob   8196 2457
14caba1bc2835573f3c20b7f2e5fb638a08e12ee blob   8196 593577
159fdc73e63cf90624d128d87b8185154727714e blob   8196 692097
15ff79f644a0596529eba0592017dce39e222b8e blob   8196 404747
16b9dea85eab6d7e452bdea4889e24a8ad79afd5 blob   8196 560737
197f45d948a36ac3762e5daf6ef4d43a5d969503 blob   8196 536107
1c0e83071ca03451d4034d9517bb503d62fad621 tree   3636 12
1f0ca97497381a196e53a7639ee769ed019469a3 blob   8196 700307
20a9519106ab64bf043456a58b6bfb04f1c7b39d blob   8196 265177
2175a1a9d8757b3836f5cc44c6af0297aea36709 blob   8196 462217
2db6b919f253444b5437d8251e5d101d5a34e1b3 blob   8196 339067
3545eb1f5549261267ab0577b94372e88b49731d blob   8196 626417
359017d1534767455090901a260985de1658d752 blob   8196 59927
3927444e44b49dfa6cdc768298ae879ec298c45d blob   8196 815247
408dd031138139f6ac6f402988f960527871f71a blob   8196 117397
41adb5af8e7f9737b16261fb0c224c7550c82f23 blob   8196 224127
49d17d605f042c1e978a68f625be6ab6294fa8fa blob   8196 150237
5217ce416b26a3d76191d873490110746d0e8a04 blob   8196 429377
57983aab7f7384626a6a1f9ec08fba1902dd11e5 blob   8196 445797
59a27076dc0a8989215a160d61ac401e41c05126 blob   8196 330857
5a65a213ee0ebdc285c8e8eca24e9eda97f8a384 blob   8196 486847
5cadb04c4d4ec953dffc528bf75561a6ae1c5820 blob   8196 782407
5e1b961ae623672df764f64b737f332318d43baa blob   8196 585367
5ef3a0f4954ade2d5c290ccc4d791c3b219d89ea blob   8196 609997
610d16151ceb1dc4d5138f63ed410819a8b9161c blob   8196 618207
611261b75bd720d3433ea8975d555b1ac3e692bd blob   8196 642837
614e235cd8ca8af7ccf402a92eb34baadaaa3f18 blob   8196 380117
6910c5a645c9fe7f6b728034566b1668f0677a8e blob   8196 84557
6dbed45fde708bb67e6b21bd55976483305f9e74 blob   8196 708517
72528baaeeba0d9c01da36a7a0add1ac49d860f2 blob   8196 733147
72826d3e97bc228616e06235566a0db59c94bd74 blob   8196 511477
72e7428e5ee3797ca0bf955f723b915bee919c48 blob   8196 215917
7353550b9b0e1da4f68b9484dfad2634100a00cc blob   8196 281597
75f67c0c230f8923db5831094b1cc67f61bf1734 blob   8196 412957
8162ceb825c07e3b1e17f5775665085da9b1e855 blob   8196 76347
816f18d19f433f5df9edbfb5547684b519fdeb3b blob   8196 207707
84d1369c26d187b24dffe9029e81e119e4a374f5 blob   8196 601787
84e4d2ce637781776791c8e2cf4a9312a2783ceb blob   8196 454007
852ba0cf084474c1b0b48052606ae27346a5b1a1 blob   8196 396537
85fdf2eed169dbc1fe2d71439b589b0326dad12b blob   8196 240547
862f6954d9afd549b48fa2ef8e2f8ab96e309916 blob   8196 10667
8c04fa425f4dfb4555b376e73d8f28d56b97a569 blob   8196 371907
8d06001a3d38390afa66576caa6c55c796e33835 blob   8196 68137
8e6ffc05856460c2e08c8e9d824bbf510d3c1b52 blob   8196 298017
8f744480abe8ad05bc419d1ab2e375b9c0fa3978 blob   8196 158447
912fa0ec5536f31122e34577a4baf3b22d40de2a blob   8196 125607
92534f38b94c1da321d88c9ab5af8c3e804c2507 blob   8196 314437
94a015b2b6053f7a1d541969919e879bb2b75eef blob   8196 273387
94f5d368a7c4ea294c463dc45cf15d387fa83c4e blob   8196 232337
95b51158cd6365da9b10f1d8b06ba76dc5d5c5f1 blob   8196 421167
964e51bf7d344bda71ea5e12dbd7bfb90120fcf0 blob   8196 109187
99ff18078623c32b85a49cc8a03e3c58ee94eecb blob   8196 683887
9b655d54faaf0a737a03731852f27cf6b552bcaf blob   8196 470427
9c4e1f8c16d04d90a2217279240996276d617067 blob   8196 199497
a3233ba1323f07a0d68f6020e7209025819cfa13 blob   8196 478637
a769ce6dfe1abe1b6162627b2b5df89f4f7d4317 blob   8196 790617
aa82432626cc08fb818a20aa62b607aa52e7b35d blob   8196 757777
b0566dd5d479c80c278bd5455c92aca689328471 blob   8196 142027
b2f07ee5771d9e0de7166bc72a4a7ebce9830779 blob   8196 388327
b302b77fd5595784b5e85e91f8b4314fff49a6a1 blob   8196 807037
b31fb3fb181512bc608b58cb33323d97ad6eac2f blob   8196 256967
b5b44a475116c2d0054edf54c699909d5d583aac blob   8196 675677
b5ec32ad29b65e5742cd1857d17e92c2efc5da96 blob   8196 716727
b976a8fd346486d78cdebeaa0b0ac200befca629 blob   8196 741357
bab18d872e9183c6d450b326477205bb0cc081cb blob   8196 248757
bf265906aab0df90b6a4bdb1fe6f8088a9038435 blob   8196 798827
bf96a31446f37d8e57bb38a00797aa3af1f99370 blob   8196 43507
c16eb68827fa5d6da73b320b431cf736c7a6a4af blob   8196 437587
c1c35c36d4300da28c0570746adaf2f5b0b015a3 blob   8196 347277
c80092496b80b5f21503b8c838dccfc1f2e2ddde blob   8196 27087
ceade5760b1ba0bc11d4e4db6982ddf671495e58 blob   8196 306227
cf823d111604e8a014e0702b5e15b242bb961c78 blob   8196 724937
d2e455cc03081911f9ecd81245becd858d1e64ca blob   8196 503267
d67069815168092ee0eadeab8177002bd0376b6f blob   8196 765987
d68756996794df8c00dfcbf520662b14cb06958e blob   8196 667467
dd6209d4c0c5d4f210a8d1bb4a4d314cf284dea9 blob   8196 363697
de1679ebb44d3fe59e8d2378471b56db384fb181 blob   8196 495057
de3ed457f973b7ffb20edc36002c47a6e4b41066 blob   8196 191287
debe389b3bdd62d96748db592e99cb0cc7b1b0f2 blob   8196 519687
e25dc2ac80f9f78aa2809b5cd254ce47a51efbe5 blob   8196 651047
e28a360bcbd69ca1a0bb47834e640069c6672a8d blob   8196 289807
e3332ff9a2540b45e599be0c7bca8bbe28af2b43 blob   8196 577157
e572e59eee8119f8fb58e8595ecd0c622f2d6e29 blob   8196 527897
e5a12c79cec70d52817054c4b9ef321003c6755f blob   8196 35297
e652cd97e9aae1523d892c1f417274dd26c3bcd3 blob   8196 749567
ea5a4b4fed0bab7beffd3c7fc6cc549df47017d7 blob   8196 659257
f02359c44ca04a542cc5bf59aa5f1de6cd1d5a4c blob   8196 133817
f45d142313c7a5270a60c664bb463cddadc467c1 blob   8196 100977
f5577acbfd83dddf90b2054d6cb5dce2df6d06ee blob   8196 322647
f5fc0ff4afc14d9dfcb2580d3f438edd4cd8130a blob   8196 174867
fa7ca115eb82e14f0263990362d4fc27591e1143 blob   8196 774197
fb294d29a9d045d5a46a9c00e53777b394ceb346 blob   8196 544317
fff3a3a92d2268a464dbdcd00fc055885ee3cba9 blob   8196 166657
chain length = 1: 1 object
test-1-72107142a6b90ea2d2c17e4490b4df0bff501521.pack: ok
*   ok 2: pack-objects with index version 1

* expecting success: pack2=$(git pack-objects --index-version=2 test-2 <obj-list) &&
     git verify-pack -v "test-2-${pack2}.pack"
01179d82b18c252824e20e190543e0e84950d820 blob   8196 183077
03a6f56dbbb556425ef8c43c31519b32eb5629a4 blob   8196 355487
0471b3b8ab8da19f3968dc238e9555f4e48ce858 blob   8196 18877
0508b858e01f0367552fb14722388ba48dbd36f7 blob   8196 51717
08a8cf223e5dc57504da3cd8eb56d33f276dc1b9 blob   8196 568947
09ba511a995b8ea75067036d5c046f39052a3bd8 blob   8196 92767
0b968294884af115eb5a1b941b3dabd48470c3bb blob   12 823457 1 3927444e44b49dfa6cdc768298ae879ec298c45d
0d6e5c0388744cf82463ce1283ff99e863e9b26e blob   8196 634627
10f7133774acbc162f5f79804744d64747eee380 blob   8196 552527
1297547aab30f952af805d38f6f1c1930cb3117b blob   8196 2457
14caba1bc2835573f3c20b7f2e5fb638a08e12ee blob   8196 593577
159fdc73e63cf90624d128d87b8185154727714e blob   8196 692097
15ff79f644a0596529eba0592017dce39e222b8e blob   8196 404747
16b9dea85eab6d7e452bdea4889e24a8ad79afd5 blob   8196 560737
197f45d948a36ac3762e5daf6ef4d43a5d969503 blob   8196 536107
1c0e83071ca03451d4034d9517bb503d62fad621 tree   3636 12
1f0ca97497381a196e53a7639ee769ed019469a3 blob   8196 700307
20a9519106ab64bf043456a58b6bfb04f1c7b39d blob   8196 265177
2175a1a9d8757b3836f5cc44c6af0297aea36709 blob   8196 462217
2db6b919f253444b5437d8251e5d101d5a34e1b3 blob   8196 339067
3545eb1f5549261267ab0577b94372e88b49731d blob   8196 626417
359017d1534767455090901a260985de1658d752 blob   8196 59927
3927444e44b49dfa6cdc768298ae879ec298c45d blob   8196 815247
408dd031138139f6ac6f402988f960527871f71a blob   8196 117397
41adb5af8e7f9737b16261fb0c224c7550c82f23 blob   8196 224127
49d17d605f042c1e978a68f625be6ab6294fa8fa blob   8196 150237
5217ce416b26a3d76191d873490110746d0e8a04 blob   8196 429377
57983aab7f7384626a6a1f9ec08fba1902dd11e5 blob   8196 445797
59a27076dc0a8989215a160d61ac401e41c05126 blob   8196 330857
5a65a213ee0ebdc285c8e8eca24e9eda97f8a384 blob   8196 486847
5cadb04c4d4ec953dffc528bf75561a6ae1c5820 blob   8196 782407
5e1b961ae623672df764f64b737f332318d43baa blob   8196 585367
5ef3a0f4954ade2d5c290ccc4d791c3b219d89ea blob   8196 609997
610d16151ceb1dc4d5138f63ed410819a8b9161c blob   8196 618207
611261b75bd720d3433ea8975d555b1ac3e692bd blob   8196 642837
614e235cd8ca8af7ccf402a92eb34baadaaa3f18 blob   8196 380117
6910c5a645c9fe7f6b728034566b1668f0677a8e blob   8196 84557
6dbed45fde708bb67e6b21bd55976483305f9e74 blob   8196 708517
72528baaeeba0d9c01da36a7a0add1ac49d860f2 blob   8196 733147
72826d3e97bc228616e06235566a0db59c94bd74 blob   8196 511477
72e7428e5ee3797ca0bf955f723b915bee919c48 blob   8196 215917
7353550b9b0e1da4f68b9484dfad2634100a00cc blob   8196 281597
75f67c0c230f8923db5831094b1cc67f61bf1734 blob   8196 412957
8162ceb825c07e3b1e17f5775665085da9b1e855 blob   8196 76347
816f18d19f433f5df9edbfb5547684b519fdeb3b blob   8196 207707
84d1369c26d187b24dffe9029e81e119e4a374f5 blob   8196 601787
84e4d2ce637781776791c8e2cf4a9312a2783ceb blob   8196 454007
852ba0cf084474c1b0b48052606ae27346a5b1a1 blob   8196 396537
85fdf2eed169dbc1fe2d71439b589b0326dad12b blob   8196 240547
862f6954d9afd549b48fa2ef8e2f8ab96e309916 blob   8196 10667
8c04fa425f4dfb4555b376e73d8f28d56b97a569 blob   8196 371907
8d06001a3d38390afa66576caa6c55c796e33835 blob   8196 68137
8e6ffc05856460c2e08c8e9d824bbf510d3c1b52 blob   8196 298017
8f744480abe8ad05bc419d1ab2e375b9c0fa3978 blob   8196 158447
912fa0ec5536f31122e34577a4baf3b22d40de2a blob   8196 125607
92534f38b94c1da321d88c9ab5af8c3e804c2507 blob   8196 314437
94a015b2b6053f7a1d541969919e879bb2b75eef blob   8196 273387
94f5d368a7c4ea294c463dc45cf15d387fa83c4e blob   8196 232337
95b51158cd6365da9b10f1d8b06ba76dc5d5c5f1 blob   8196 421167
964e51bf7d344bda71ea5e12dbd7bfb90120fcf0 blob   8196 109187
99ff18078623c32b85a49cc8a03e3c58ee94eecb blob   8196 683887
9b655d54faaf0a737a03731852f27cf6b552bcaf blob   8196 470427
9c4e1f8c16d04d90a2217279240996276d617067 blob   8196 199497
a3233ba1323f07a0d68f6020e7209025819cfa13 blob   8196 478637
a769ce6dfe1abe1b6162627b2b5df89f4f7d4317 blob   8196 790617
aa82432626cc08fb818a20aa62b607aa52e7b35d blob   8196 757777
b0566dd5d479c80c278bd5455c92aca689328471 blob   8196 142027
b2f07ee5771d9e0de7166bc72a4a7ebce9830779 blob   8196 388327
b302b77fd5595784b5e85e91f8b4314fff49a6a1 blob   8196 807037
b31fb3fb181512bc608b58cb33323d97ad6eac2f blob   8196 256967
b5b44a475116c2d0054edf54c699909d5d583aac blob   8196 675677
b5ec32ad29b65e5742cd1857d17e92c2efc5da96 blob   8196 716727
b976a8fd346486d78cdebeaa0b0ac200befca629 blob   8196 741357
bab18d872e9183c6d450b326477205bb0cc081cb blob   8196 248757
bf265906aab0df90b6a4bdb1fe6f8088a9038435 blob   8196 798827
bf96a31446f37d8e57bb38a00797aa3af1f99370 blob   8196 43507
c16eb68827fa5d6da73b320b431cf736c7a6a4af blob   8196 437587
c1c35c36d4300da28c0570746adaf2f5b0b015a3 blob   8196 347277
c80092496b80b5f21503b8c838dccfc1f2e2ddde blob   8196 27087
ceade5760b1ba0bc11d4e4db6982ddf671495e58 blob   8196 306227
cf823d111604e8a014e0702b5e15b242bb961c78 blob   8196 724937
d2e455cc03081911f9ecd81245becd858d1e64ca blob   8196 503267
d67069815168092ee0eadeab8177002bd0376b6f blob   8196 765987
d68756996794df8c00dfcbf520662b14cb06958e blob   8196 667467
dd6209d4c0c5d4f210a8d1bb4a4d314cf284dea9 blob   8196 363697
de1679ebb44d3fe59e8d2378471b56db384fb181 blob   8196 495057
de3ed457f973b7ffb20edc36002c47a6e4b41066 blob   8196 191287
debe389b3bdd62d96748db592e99cb0cc7b1b0f2 blob   8196 519687
e25dc2ac80f9f78aa2809b5cd254ce47a51efbe5 blob   8196 651047
e28a360bcbd69ca1a0bb47834e640069c6672a8d blob   8196 289807
e3332ff9a2540b45e599be0c7bca8bbe28af2b43 blob   8196 577157
e572e59eee8119f8fb58e8595ecd0c622f2d6e29 blob   8196 527897
e5a12c79cec70d52817054c4b9ef321003c6755f blob   8196 35297
e652cd97e9aae1523d892c1f417274dd26c3bcd3 blob   8196 749567
ea5a4b4fed0bab7beffd3c7fc6cc549df47017d7 blob   8196 659257
f02359c44ca04a542cc5bf59aa5f1de6cd1d5a4c blob   8196 133817
f45d142313c7a5270a60c664bb463cddadc467c1 blob   8196 100977
f5577acbfd83dddf90b2054d6cb5dce2df6d06ee blob   8196 322647
f5fc0ff4afc14d9dfcb2580d3f438edd4cd8130a blob   8196 174867
fa7ca115eb82e14f0263990362d4fc27591e1143 blob   8196 774197
fb294d29a9d045d5a46a9c00e53777b394ceb346 blob   8196 544317
fff3a3a92d2268a464dbdcd00fc055885ee3cba9 blob   8196 166657
chain length = 1: 1 object
test-2-72107142a6b90ea2d2c17e4490b4df0bff501521.pack: ok
*   ok 3: pack-objects with index version 2

* expecting success: cmp "test-1-${pack1}.pack" "test-2-${pack2}.pack"
*   ok 4: both packs should be identical

* expecting failure: cmp "test-1-${pack1}.idx" "test-2-${pack2}.idx"
test-1-72107142a6b90ea2d2c17e4490b4df0bff501521.idx test-2-72107142a6b90ea2d2c17e4490b4df0bff501521.idx differ: char 1, line 1
*   ok 5: index v1 and index v2 should be different

* expecting success: git-index-pack --index-version=1 -o 1.idx "test-1-${pack1}.pack"
72107142a6b90ea2d2c17e4490b4df0bff501521
*   ok 6: index-pack with index version 1

* expecting success: git-index-pack --index-version=2 -o 2.idx "test-1-${pack1}.pack"
72107142a6b90ea2d2c17e4490b4df0bff501521
*   ok 7: index-pack with index version 2

* expecting success: cmp "test-1-${pack1}.idx" "1.idx" &&
     cmp "test-2-${pack2}.idx" "2.idx"
*   ok 8: index-pack results should match pack-objects ones

* expecting success: pack3=$(git pack-objects --index-version=2,0x40000 test-3 <obj-list)
*   ok 9: index v2: force some 64-bit offsets with pack-objects

* expecting success: git verify-pack -v "test-3-${pack3}.pack"
01179d82b18c252824e20e190543e0e84950d820 blob   8196 183077
03a6f56dbbb556425ef8c43c31519b32eb5629a4 blob   8196 355487
0471b3b8ab8da19f3968dc238e9555f4e48ce858 blob   8196 18877
0508b858e01f0367552fb14722388ba48dbd36f7 blob   8196 51717
08a8cf223e5dc57504da3cd8eb56d33f276dc1b9 blob   8196 568947
09ba511a995b8ea75067036d5c046f39052a3bd8 blob   8196 92767
0b968294884af115eb5a1b941b3dabd48470c3bb blob   12 823457 1 3927444e44b49dfa6cdc768298ae879ec298c45d
0d6e5c0388744cf82463ce1283ff99e863e9b26e blob   8196 634627
10f7133774acbc162f5f79804744d64747eee380 blob   8196 552527
1297547aab30f952af805d38f6f1c1930cb3117b blob   8196 2457
14caba1bc2835573f3c20b7f2e5fb638a08e12ee blob   8196 593577
159fdc73e63cf90624d128d87b8185154727714e blob   8196 692097
15ff79f644a0596529eba0592017dce39e222b8e blob   8196 404747
16b9dea85eab6d7e452bdea4889e24a8ad79afd5 blob   8196 560737
197f45d948a36ac3762e5daf6ef4d43a5d969503 blob   8196 536107
1c0e83071ca03451d4034d9517bb503d62fad621 tree   3636 12
1f0ca97497381a196e53a7639ee769ed019469a3 blob   8196 700307
20a9519106ab64bf043456a58b6bfb04f1c7b39d blob   8196 265177
2175a1a9d8757b3836f5cc44c6af0297aea36709 blob   8196 462217
2db6b919f253444b5437d8251e5d101d5a34e1b3 blob   8196 339067
3545eb1f5549261267ab0577b94372e88b49731d blob   8196 626417
359017d1534767455090901a260985de1658d752 blob   8196 59927
3927444e44b49dfa6cdc768298ae879ec298c45d blob   8196 815247
408dd031138139f6ac6f402988f960527871f71a blob   8196 117397
41adb5af8e7f9737b16261fb0c224c7550c82f23 blob   8196 224127
49d17d605f042c1e978a68f625be6ab6294fa8fa blob   8196 150237
5217ce416b26a3d76191d873490110746d0e8a04 blob   8196 429377
57983aab7f7384626a6a1f9ec08fba1902dd11e5 blob   8196 445797
59a27076dc0a8989215a160d61ac401e41c05126 blob   8196 330857
5a65a213ee0ebdc285c8e8eca24e9eda97f8a384 blob   8196 486847
5cadb04c4d4ec953dffc528bf75561a6ae1c5820 blob   8196 782407
5e1b961ae623672df764f64b737f332318d43baa blob   8196 585367
5ef3a0f4954ade2d5c290ccc4d791c3b219d89ea blob   8196 609997
610d16151ceb1dc4d5138f63ed410819a8b9161c blob   8196 618207
611261b75bd720d3433ea8975d555b1ac3e692bd blob   8196 642837
614e235cd8ca8af7ccf402a92eb34baadaaa3f18 blob   8196 380117
6910c5a645c9fe7f6b728034566b1668f0677a8e blob   8196 84557
6dbed45fde708bb67e6b21bd55976483305f9e74 blob   8196 708517
72528baaeeba0d9c01da36a7a0add1ac49d860f2 blob   8196 733147
72826d3e97bc228616e06235566a0db59c94bd74 blob   8196 511477
72e7428e5ee3797ca0bf955f723b915bee919c48 blob   8196 215917
7353550b9b0e1da4f68b9484dfad2634100a00cc blob   8196 281597
75f67c0c230f8923db5831094b1cc67f61bf1734 blob   8196 412957
8162ceb825c07e3b1e17f5775665085da9b1e855 blob   8196 76347
816f18d19f433f5df9edbfb5547684b519fdeb3b blob   8196 207707
84d1369c26d187b24dffe9029e81e119e4a374f5 blob   8196 601787
84e4d2ce637781776791c8e2cf4a9312a2783ceb blob   8196 454007
852ba0cf084474c1b0b48052606ae27346a5b1a1 blob   8196 396537
85fdf2eed169dbc1fe2d71439b589b0326dad12b blob   8196 240547
862f6954d9afd549b48fa2ef8e2f8ab96e309916 blob   8196 10667
8c04fa425f4dfb4555b376e73d8f28d56b97a569 blob   8196 371907
8d06001a3d38390afa66576caa6c55c796e33835 blob   8196 68137
8e6ffc05856460c2e08c8e9d824bbf510d3c1b52 blob   8196 298017
8f744480abe8ad05bc419d1ab2e375b9c0fa3978 blob   8196 158447
912fa0ec5536f31122e34577a4baf3b22d40de2a blob   8196 125607
92534f38b94c1da321d88c9ab5af8c3e804c2507 blob   8196 314437
94a015b2b6053f7a1d541969919e879bb2b75eef blob   8196 273387
94f5d368a7c4ea294c463dc45cf15d387fa83c4e blob   8196 232337
95b51158cd6365da9b10f1d8b06ba76dc5d5c5f1 blob   8196 421167
964e51bf7d344bda71ea5e12dbd7bfb90120fcf0 blob   8196 109187
99ff18078623c32b85a49cc8a03e3c58ee94eecb blob   8196 683887
9b655d54faaf0a737a03731852f27cf6b552bcaf blob   8196 470427
9c4e1f8c16d04d90a2217279240996276d617067 blob   8196 199497
a3233ba1323f07a0d68f6020e7209025819cfa13 blob   8196 478637
a769ce6dfe1abe1b6162627b2b5df89f4f7d4317 blob   8196 790617
aa82432626cc08fb818a20aa62b607aa52e7b35d blob   8196 757777
b0566dd5d479c80c278bd5455c92aca689328471 blob   8196 142027
b2f07ee5771d9e0de7166bc72a4a7ebce9830779 blob   8196 388327
b302b77fd5595784b5e85e91f8b4314fff49a6a1 blob   8196 807037
b31fb3fb181512bc608b58cb33323d97ad6eac2f blob   8196 256967
b5b44a475116c2d0054edf54c699909d5d583aac blob   8196 675677
b5ec32ad29b65e5742cd1857d17e92c2efc5da96 blob   8196 716727
b976a8fd346486d78cdebeaa0b0ac200befca629 blob   8196 741357
bab18d872e9183c6d450b326477205bb0cc081cb blob   8196 248757
bf265906aab0df90b6a4bdb1fe6f8088a9038435 blob   8196 798827
bf96a31446f37d8e57bb38a00797aa3af1f99370 blob   8196 43507
c16eb68827fa5d6da73b320b431cf736c7a6a4af blob   8196 437587
c1c35c36d4300da28c0570746adaf2f5b0b015a3 blob   8196 347277
c80092496b80b5f21503b8c838dccfc1f2e2ddde blob   8196 27087
ceade5760b1ba0bc11d4e4db6982ddf671495e58 blob   8196 306227
cf823d111604e8a014e0702b5e15b242bb961c78 blob   8196 724937
d2e455cc03081911f9ecd81245becd858d1e64ca blob   8196 503267
d67069815168092ee0eadeab8177002bd0376b6f blob   8196 765987
d68756996794df8c00dfcbf520662b14cb06958e blob   8196 667467
dd6209d4c0c5d4f210a8d1bb4a4d314cf284dea9 blob   8196 363697
de1679ebb44d3fe59e8d2378471b56db384fb181 blob   8196 495057
de3ed457f973b7ffb20edc36002c47a6e4b41066 blob   8196 191287
debe389b3bdd62d96748db592e99cb0cc7b1b0f2 blob   8196 519687
e25dc2ac80f9f78aa2809b5cd254ce47a51efbe5 blob   8196 651047
e28a360bcbd69ca1a0bb47834e640069c6672a8d blob   8196 289807
e3332ff9a2540b45e599be0c7bca8bbe28af2b43 blob   8196 577157
e572e59eee8119f8fb58e8595ecd0c622f2d6e29 blob   8196 527897
e5a12c79cec70d52817054c4b9ef321003c6755f blob   8196 35297
e652cd97e9aae1523d892c1f417274dd26c3bcd3 blob   8196 749567
ea5a4b4fed0bab7beffd3c7fc6cc549df47017d7 blob   8196 659257
f02359c44ca04a542cc5bf59aa5f1de6cd1d5a4c blob   8196 133817
f45d142313c7a5270a60c664bb463cddadc467c1 blob   8196 100977
f5577acbfd83dddf90b2054d6cb5dce2df6d06ee blob   8196 322647
f5fc0ff4afc14d9dfcb2580d3f438edd4cd8130a blob   8196 174867
fa7ca115eb82e14f0263990362d4fc27591e1143 blob   8196 774197
fb294d29a9d045d5a46a9c00e53777b394ceb346 blob   8196 544317
fff3a3a92d2268a464dbdcd00fc055885ee3cba9 blob   8196 166657
chain length = 1: 1 object
test-3-72107142a6b90ea2d2c17e4490b4df0bff501521.pack: ok
*   ok 10: index v2: verify a pack with some 64-bit offsets

* expecting failure: cmp "test-2-${pack2}.idx" "test-3-${pack3}.idx"
test-2-72107142a6b90ea2d2c17e4490b4df0bff501521.idx test-3-72107142a6b90ea2d2c17e4490b4df0bff501521.idx differ: char 3485, line 11
*   ok 11: 64-bit offsets: should be different from previous index v2 results

* expecting success: git-index-pack --index-version=2,0x40000 -o 3.idx "test-1-${pack1}.pack"
72107142a6b90ea2d2c17e4490b4df0bff501521
*   ok 12: index v2: force some 64-bit offsets with index-pack

* expecting success: cmp "test-3-${pack3}.idx" "3.idx"
*   ok 13: 64-bit offsets: index-pack result should match pack-objects one

* expecting success: git-index-pack --index-version=1 --stdin < "test-1-${pack1}.pack" &&
     git prune-packed &&
     git count-objects | ( read nr rest && test "$nr" -eq 1 ) &&
     cmp "test-1-${pack1}.pack" ".git/objects/pack/pack-${pack1}.pack" &&
     cmp "test-1-${pack1}.idx"  ".git/objects/pack/pack-${pack1}.idx"
pack	72107142a6b90ea2d2c17e4490b4df0bff501521
*   ok 14: [index v1] 1) stream pack to repository

* expecting success: # 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 | (
       read delta_offs delta_sha1 &&
       git cat-file blob "$delta_sha1" > blob_1 &&
       chmod +w ".git/objects/pack/pack-${pack1}.pack" &&
       dd of=".git/objects/pack/pack-${pack1}.pack" seek=$(($delta_offs + 1)) \
	  if=".git/objects/pack/pack-${pack1}.idx" skip=$((256 * 4 + 4)) \
	  bs=1 count=20 conv=notrunc &&
       git cat-file blob "$delta_sha1" > blob_2 )
20+0 records in
20+0 records out
20 bytes (20 B) copied, 9.6e-05 s, 208 kB/s
*   ok 15: [index v1] 2) create a stealth corruption in a delta base reference

* expecting failure: cmp blob_1 blob_2
blob_1 blob_2 differ: char 5, line 2
*   ok 16: [index v1] 3) corrupted delta happily returned wrong data

* expecting failure: git fsck --full $commit
error: Packfile .git/objects/pack/pack-72107142a6b90ea2d2c17e4490b4df0bff501521.pack SHA1 mismatch with itself
error: sha1 mismatch 0b968294884af115eb5a1b941b3dabd48470c3bb

error: 0b968294884af115eb5a1b941b3dabd48470c3bb: object corrupt or missing
*   ok 17: [index v1] 4) confirm that the pack is actually corrupted

* expecting success: pack4=$(git pack-objects test-4 <obj-list) &&
     test -f "test-4-${pack1}.pack"
*   ok 18: [index v1] 5) pack-objects happily reuses corrupted data

* expecting failure: git verify-pack -v "test-4-${pack1}.pack"
error: packed 0b968294884af115eb5a1b941b3dabd48470c3bb from test-4-72107142a6b90ea2d2c17e4490b4df0bff501521.pack is corrupt
test-4-72107142a6b90ea2d2c17e4490b4df0bff501521.pack: bad
*   ok 19: [index v1] 6) newly created pack is BAD !

* expecting success: rm -f .git/objects/pack/* &&
     git-index-pack --index-version=2 --stdin < "test-1-${pack1}.pack" &&
     git prune-packed &&
     git count-objects | ( read nr rest && test "$nr" -eq 1 ) &&
     cmp "test-1-${pack1}.pack" ".git/objects/pack/pack-${pack1}.pack" &&
     cmp "test-2-${pack1}.idx"  ".git/objects/pack/pack-${pack1}.idx"
pack	72107142a6b90ea2d2c17e4490b4df0bff501521
*   ok 20: [index v2] 1) stream pack to repository

* expecting success: # 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 | (
       read delta_offs delta_sha1 delta_crc &&
       git cat-file blob "$delta_sha1" > blob_3 &&
       chmod +w ".git/objects/pack/pack-${pack1}.pack" &&
       dd of=".git/objects/pack/pack-${pack1}.pack" seek=$(($delta_offs + 1)) \
	  if=".git/objects/pack/pack-${pack1}.idx" skip=$((8 + 256 * 4)) \
	  bs=1 count=20 conv=notrunc &&
       git cat-file blob "$delta_sha1" > blob_4 )
20+0 records in
20+0 records out
20 bytes (20 B) copied, 9.8e-05 s, 204 kB/s
*   ok 21: [index v2] 2) create a stealth corruption in a delta base reference

* expecting failure: cmp blob_3 blob_4
blob_3 blob_4 differ: char 5, line 2
*   ok 22: [index v2] 3) corrupted delta happily returned wrong data

* expecting failure: git fsck --full $commit
error: Packfile .git/objects/pack/pack-72107142a6b90ea2d2c17e4490b4df0bff501521.pack SHA1 mismatch with itself
error: sha1 mismatch 0b968294884af115eb5a1b941b3dabd48470c3bb

error: 0b968294884af115eb5a1b941b3dabd48470c3bb: object corrupt or missing
*   ok 23: [index v2] 4) confirm that the pack is actually corrupted

* expecting failure: git pack-objects test-5 <obj-list
fatal: bad packed object CRC for 0b968294884af115eb5a1b941b3dabd48470c3bb
*   ok 24: [index v2] 5) pack-objects refuses to reuse corrupted data

* passed all 24 test(s)
*** t5304-prune.sh ***
* expecting success: 

	: > file &&
	git add file &&
	test_tick &&
	git commit -m initial &&
	git gc


Created initial commit 1bd44cb: initial
 0 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 file
*   ok 1: setup

* expecting success: 

	orig_pack=$(echo .git/objects/pack/*.pack) &&
	: > .git/objects/tmp_1.pack &&
	: > .git/objects/tmp_2.pack &&
	test-chmtime -86501 .git/objects/tmp_1.pack &&
	git prune --expire 1.day &&
	test -f $orig_pack &&
	test -f .git/objects/tmp_2.pack &&
	! test -f .git/objects/tmp_1.pack


Removing stale temporary file .git/objects/tmp_1.pack
*   ok 2: prune stale packs

* passed all 2 test(s)
*** t5400-send-pack.sh ***
* expecting success: 
	test_tick &&
	mkdir mozart mozart/is &&
	echo "Commit #0" >mozart/is/pink &&
	git update-index --add mozart/is/pink &&
	tree=$(git write-tree) &&
	commit=$(echo "Commit #0" | git commit-tree $tree) &&
	zero=$commit &&
	parent=$zero &&
	i=0 &&
	while test $i -le $cnt
	do
	    i=$(($i+1)) &&
	    test_tick &&
	    echo "Commit #$i" >mozart/is/pink &&
	    git update-index --add mozart/is/pink &&
	    tree=$(git write-tree) &&
	    commit=$(echo "Commit #$i" | git commit-tree $tree -p $parent) &&
	    git update-ref refs/tags/commit$i $commit &&
	    parent=$commit || return 1
	done &&
	git update-ref HEAD "$commit" &&
	git-clone ./. victim &&
	cd victim &&
	git log &&
	cd .. &&
	git update-ref HEAD "$zero" &&
	parent=$zero &&
	i=0 &&
	while test $i -le $cnt
	do
	    i=$(($i+1)) &&
	    test_tick &&
	    echo "Rebase #$i" >mozart/is/pink &&
	    git update-index --add mozart/is/pink &&
	    tree=$(git write-tree) &&
	    commit=$(echo "Rebase #$i" | git commit-tree $tree -p $parent) &&
	    git update-ref refs/tags/rebase$i $commit &&
	    parent=$commit || return 1
	done &&
	git update-ref HEAD "$commit" &&
	echo Rebase &&
	git log
Initialized empty Git repository in /build/buildd/git-core-1.5.4.3/t/trash/victim/.git/
0 blocks
commit fbc850672173770f17d48f9f2dfcb286d30b70cb
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:18:13 2005 -0700

    Commit #65

commit 940af75942cf34a9fc156d9dc79c8c370e4c3247
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:17:13 2005 -0700

    Commit #64

commit 1fe3a3ebbeaddd1e503ee516a5433a8ebe097112
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:16:13 2005 -0700

    Commit #63

commit 0c78ec36deec72f8c6d458db5b753249a5447dec
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:15:13 2005 -0700

    Commit #62

commit 0ad1da14d02ef96f2c1cb8403952ffddeaaca439
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:14:13 2005 -0700

    Commit #61

commit 15278e4b9b51ca8e00785fff5592d9ba7b8012ea
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:13:13 2005 -0700

    Commit #60

commit d92539d97407cae3ac62cdd1992188ce96a04699
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:12:13 2005 -0700

    Commit #59

commit eeddc69755cde0046432203191b431846124c36d
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:11:13 2005 -0700

    Commit #58

commit 9481eb1cebd4e35080a85eaac0a389e436d174d9
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:10:13 2005 -0700

    Commit #57

commit 9ab7d0c3f85908c1624cc58f67c236b2e5d53c5d
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:09:13 2005 -0700

    Commit #56

commit 070f3c8d7d43c5b9df69498416664b994a36a3e7
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:08:13 2005 -0700

    Commit #55

commit a2f3e1ffc14adb111494e37e857de5428da7230e
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:07:13 2005 -0700

    Commit #54

commit 373ca332c114a8af8262474c0b750133d11c3467
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:06:13 2005 -0700

    Commit #53

commit abddf6c6693561aed51ed7308754360720399450
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:05:13 2005 -0700

    Commit #52

commit e9dc99c35123a1d9dd416eb32975f518f7e52776
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:04:13 2005 -0700

    Commit #51

commit 3efc54f7bd18addc186e565f051c1f57ae499205
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:03:13 2005 -0700

    Commit #50

commit 288f90defdf9f8fe6cafb95c4a53d41e3d2914bc
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:02:13 2005 -0700

    Commit #49

commit 1dfae6503af0ff1c353be39162beb34744556d2d
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:01:13 2005 -0700

    Commit #48

commit c21493faada856b0f2ac0b85de568ffd9f21ad09
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:00:13 2005 -0700

    Commit #47

commit 0e48e7bf42f7c84d1039794461501f4d3e6bef59
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:59:13 2005 -0700

    Commit #46

commit bb0ff093c62b37247e4b570e41e57fa123962ee8
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:58:13 2005 -0700

    Commit #45

commit a2d17f74bfdf7acc0c40e3b228d57a4d68a9c01b
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:57:13 2005 -0700

    Commit #44

commit cbac9fdcb0113800bc9ff62d8c1a0cfd61815b11
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:56:13 2005 -0700

    Commit #43

commit 13eff776535a4d90e14a5ba1239e3bb094fce3ef
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:55:13 2005 -0700

    Commit #42

commit b7592bd14654cc3f437db49791a176d29d3aa8f0
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:54:13 2005 -0700

    Commit #41

commit 83b8bfc7c90441063b251721278b7e8f9c5a201a
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:53:13 2005 -0700

    Commit #40

commit 0b9d55bbcb1a6033be38cb93b03d75e5a78f9c3f
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:52:13 2005 -0700

    Commit #39

commit d453237bfb3140a104f4c3946b562e8b8e9cda13
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:51:13 2005 -0700

    Commit #38

commit 63c4e0264b89e227660dc2fbd7fc8077627ab28e
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:50:13 2005 -0700

    Commit #37

commit 5df897dfd4814feea01849f65e8fc3e81d72728f
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:49:13 2005 -0700

    Commit #36

commit 5e2d0ff7bcf7c8973b325689dd3604bd01d6b075
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:48:13 2005 -0700

    Commit #35

commit cbf881eb049d21325ff0fba1e98746e36f1d46a8
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:47:13 2005 -0700

    Commit #34

commit b8a9eb0e7c8cff2ab2d65d53f5a568dc7b54d5b0
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:46:13 2005 -0700

    Commit #33

commit 20db8c933b4ca134652d077a7a59a12f7653c3a4
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:45:13 2005 -0700

    Commit #32

commit 738136f07b8bf1cff560dc0dbf4a18eee3b1de94
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:44:13 2005 -0700

    Commit #31

commit dd3f1b3396477b30b131d10831090cd58add8a2f
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:43:13 2005 -0700

    Commit #30

commit e7bbe70cb14feebd4d4ceada22d700e1bdcb301f
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:42:13 2005 -0700

    Commit #29

commit 7c932743e94bd2239c435bf5645dccb051f3c5fe
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:41:13 2005 -0700

    Commit #28

commit c3cca0936c775de13190616bf109b3992732f2e1
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:40:13 2005 -0700

    Commit #27

commit 2eb3c6ccb3b91269a09de0d742aecfd52817f72f
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:39:13 2005 -0700

    Commit #26

commit 0f219719c1472626b844e140343f904fa4972bcc
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:38:13 2005 -0700

    Commit #25

commit 03c8ac629a12338cc02e81b17da6d7cb0e1a802b
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:37:13 2005 -0700

    Commit #24

commit 99b081ae6f13358b2cff7faad1b3f2a4c347edad
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:36:13 2005 -0700

    Commit #23

commit 7206ff76323748a074c19dacc097d2ed3b96bfb2
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:35:13 2005 -0700

    Commit #22

commit 490ddb36dddfeffa7779829333c151cbbe9e7366
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:34:13 2005 -0700

    Commit #21

commit a73206b2f61cdf7bf21c8138c9900794f0eab9a5
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:33:13 2005 -0700

    Commit #20

commit 01e16b5ab9e14247c98de5452a4be588930371be
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:32:13 2005 -0700

    Commit #19

commit 9c803e03a40e955e599e8ecb9131651832083f57
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:31:13 2005 -0700

    Commit #18

commit 6fc6ec72c6ce78e654a775f4f659411294f1d4e6
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:30:13 2005 -0700

    Commit #17

commit b601a967eeee6cb91b552c6e43b4bafdf2b1c7ac
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:29:13 2005 -0700

    Commit #16

commit 1747235a5c3fa673cab96b05b46dd97adb0c00c8
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:28:13 2005 -0700

    Commit #15

commit 26bc6342db340ab762645b0b3b83517623b4c675
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:27:13 2005 -0700

    Commit #14

commit b2f646eca1878e3000b6ceabd81b60ce604cb41e
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:26:13 2005 -0700

    Commit #13

commit be3e57a8ad8950e367abdb48fe904d3f965e96fa
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:25:13 2005 -0700

    Commit #12

commit 838c59d0f1f2160aa980e1c58db52403effc9dc6
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:24:13 2005 -0700

    Commit #11

commit 2d04f66a08825b9bd9631a379768ee94d9e35c94
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:23:13 2005 -0700

    Commit #10

commit 3b4907bf685c7f5694fd51989e990218a5844ee6
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:22:13 2005 -0700

    Commit #9

commit e87f17a34ce327a5cef1309626784bc0bcc74743
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:21:13 2005 -0700

    Commit #8

commit b1248b7697c5ba5bd2099f38eee5728f05a07a2c
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:20:13 2005 -0700

    Commit #7

commit a69e0e75ae4b3c7d5954f52f3dc1666d7facf114
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:19:13 2005 -0700

    Commit #6

commit d2559a7d1598c17fb8259ed9c923a40f242edbd7
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:18:13 2005 -0700

    Commit #5

commit c45f8a131dd92e17228868c96e1b0b0b07693331
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:17:13 2005 -0700

    Commit #4

commit 758f634f1b1a066097ec1ee3c9a4aedc0bfb3d46
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:16:13 2005 -0700

    Commit #3

commit 2285e440694323e1c325d1838d97abdecada8ade
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:15:13 2005 -0700

    Commit #2

commit b86cdba23d2682dd459133f2efac8ea660f1dd5b
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:14:13 2005 -0700

    Commit #1

commit e8d9fe63116478156180f7026f6c181cc60432c5
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:13:13 2005 -0700

    Commit #0
Rebase
commit b1a1c97e94b6388c108e195d28a3e89f00c81698
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 17:23:13 2005 -0700

    Rebase #65

commit b1a473533f3c7654e6aabe20b868f403cc4542c4
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 17:22:13 2005 -0700

    Rebase #64

commit b44d0fc2fa543aae48a3e88ca2d4bb69b0808618
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 17:21:13 2005 -0700

    Rebase #63

commit bdb72969f88d60418acc3c5cb69f94a9254e4069
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 17:20:13 2005 -0700

    Rebase #62

commit f4846c914d90426d0aa7d9ae8c617e23aeb7aadc
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 17:19:13 2005 -0700

    Rebase #61

commit 5513d6a596bf3937f715bf4c4fa240dae08c1183
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 17:18:13 2005 -0700

    Rebase #60

commit c17d7284cf4910e76deb07380fdb38db71d239c7
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 17:17:13 2005 -0700

    Rebase #59

commit 61c422e7618c96824dffec2cbb0cc7ec1933e48e
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 17:16:13 2005 -0700

    Rebase #58

commit 2d32b535df82e1d77ee22da27287e3a676723ef8
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 17:15:13 2005 -0700

    Rebase #57

commit d8638fd41e1699aa201527ace01d2ba19815aceb
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 17:14:13 2005 -0700

    Rebase #56

commit 04fe055c82dc9923f2be842c62ddf3325ed7e4c3
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 17:13:13 2005 -0700

    Rebase #55

commit 8b3228b708d50b5e797bb375d97082ec7afeace4
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 17:12:13 2005 -0700

    Rebase #54

commit 5f4c3fe8ed7e4d32b60d7abb0e2af50d1343cca0
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 17:11:13 2005 -0700

    Rebase #53

commit 7f88d5e9d36769f5c9c65bcdd6b74456be65794b
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 17:10:13 2005 -0700

    Rebase #52

commit 54fa0318009bc334ce8aa9a83e559582a15df921
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 17:09:13 2005 -0700

    Rebase #51

commit 874533e6395fa245e3aad590c5b29b113c993d88
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 17:08:13 2005 -0700

    Rebase #50

commit dc1211213cf96c29abb9e65856f42adb8ae87f44
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 17:07:13 2005 -0700

    Rebase #49

commit ecc16305000cbf7e0e28eaefa037380923f54f2b
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 17:06:13 2005 -0700

    Rebase #48

commit 22eb8b0dd79fa78df505878adb615b382c819795
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 17:05:13 2005 -0700

    Rebase #47

commit e658f744975d593f1d768ae6a252466f3d6f542e
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 17:04:13 2005 -0700

    Rebase #46

commit 927e9cfe3212295919b60727098c2bcba986c37e
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 17:03:13 2005 -0700

    Rebase #45

commit 8c6450200d3f0d8d334e87e0d8a8277a2f791251
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 17:02:13 2005 -0700

    Rebase #44

commit 63e19d3641a395e0933a71af193c8dab5ddf587a
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 17:01:13 2005 -0700

    Rebase #43

commit dea9ca7996241bf8d256a6207334ab6cb0a2f16d
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 17:00:13 2005 -0700

    Rebase #42

commit 026648f873caf2683546bb4a0bffc8293d8c2a73
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:59:13 2005 -0700

    Rebase #41

commit 614287fbf62149f243db150a29195ddd2552620e
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:58:13 2005 -0700

    Rebase #40

commit 796c2f217a5f8738534fbb7febc3879590747fc2
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:57:13 2005 -0700

    Rebase #39

commit 5aaad3995be7c0de7d694ab11b764a400a4df57f
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:56:13 2005 -0700

    Rebase #38

commit 313b77b49a4baf7c7fe8055753a71c38bdd38b47
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:55:13 2005 -0700

    Rebase #37

commit a59332167314137eb8af8837e16115c9680e018e
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:54:13 2005 -0700

    Rebase #36

commit 0ab0d27b1668006e073534c69e62685f0f9fc4ab
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:53:13 2005 -0700

    Rebase #35

commit 43f966630635e7421592b1564d06becd4329fb7f
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:52:13 2005 -0700

    Rebase #34

commit fe710d4f0305ee6cfcc29f08823ccc6a8eb2e78a
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:51:13 2005 -0700

    Rebase #33

commit 58465df8a64cc8cf28c98afc18e920e03dad9ec8
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:50:13 2005 -0700

    Rebase #32

commit 559f5ec230a71724d6ea3399c0216e52938cba74
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:49:13 2005 -0700

    Rebase #31

commit 423868ae9fccf8a50212b69677d9fe252065eb3b
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:48:13 2005 -0700

    Rebase #30

commit d02b87bdc1b8e96ed634d52ddefb6b7db693b84b
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:47:13 2005 -0700

    Rebase #29

commit 04e55758ac35dc63f899b6c3d526b2b802cee7c9
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:46:13 2005 -0700

    Rebase #28

commit be5fbd2f45796936f2cfa86bb4dffe5b95013f0e
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:45:13 2005 -0700

    Rebase #27

commit 213212c4ff3f0e681db0e061ed02dcc2e3902374
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:44:13 2005 -0700

    Rebase #26

commit 61a890331f2ecf786d50fa8248d4f86345569421
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:43:13 2005 -0700

    Rebase #25

commit a1bfffeeeb67da7d9433dd5d4dcc2876badda7de
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:42:13 2005 -0700

    Rebase #24

commit ade5cf07bd9f8a623762be2b83d5200fd4c23e78
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:41:13 2005 -0700

    Rebase #23

commit 541aba44d5797d319874b1d242c491aecd70072e
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:40:13 2005 -0700

    Rebase #22

commit 8ef186d480959ba1c1950497155e9db2bb5cf262
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:39:13 2005 -0700

    Rebase #21

commit dd1cc8a79dd40f7d83223b2b2293062a17ed60ee
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:38:13 2005 -0700

    Rebase #20

commit 60c8d8288c55de0f0dadd7f570f69a5bd9023e54
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:37:13 2005 -0700

    Rebase #19

commit 2720bed4e6e3a6011714b76356527f5626a8b7bf
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:36:13 2005 -0700

    Rebase #18

commit e4946f6736764ebcc7b4392c98b1916f37a8151c
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:35:13 2005 -0700

    Rebase #17

commit f2a50e2577f679dd6edf5afa77fb0d331cf0e487
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:34:13 2005 -0700

    Rebase #16

commit ba62d05c67970ca150478a6e204c07876eb45310
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:33:13 2005 -0700

    Rebase #15

commit 16bbc537388506c6aa3568aec7a1c295ff664ad8
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:32:13 2005 -0700

    Rebase #14

commit 8ae96d45eca9358820adedc310a2bc6ff331a3e7
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:31:13 2005 -0700

    Rebase #13

commit 2557a8c044e16526b8261947e17623841a0d5a91
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:30:13 2005 -0700

    Rebase #12

commit 3f1275e3115a421a76f0ccbd5dea35b7cf227ce9
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:29:13 2005 -0700

    Rebase #11

commit 6d31feb4517418400c8f76a834f7cff206a2b1ab
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:28:13 2005 -0700

    Rebase #10

commit 054728ce53143ed538a80cc1db2f91642848d9d8
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:27:13 2005 -0700

    Rebase #9

commit dbee1ce0dbeb64756fba483e99628287182a0be1
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:26:13 2005 -0700

    Rebase #8

commit d174cc1075a864f5db77014609f7f9af0240ed0c
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:25:13 2005 -0700

    Rebase #7

commit 18b56d78fb5f32acd1d2a027c139cb14df278e1c
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:24:13 2005 -0700

    Rebase #6

commit 754de5100e6921cb300704183c76e1c65e301beb
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:23:13 2005 -0700

    Rebase #5

commit 9fe752390a117faf8d6f239358fa821b464ff14d
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:22:13 2005 -0700

    Rebase #4

commit 3e9bfb9468271e1707c357a5018af569c2a676d4
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:21:13 2005 -0700

    Rebase #3

commit d15adbaa5fdd6b03140db45c714342b2023152fa
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:20:13 2005 -0700

    Rebase #2

commit 82c2bc152fd9f785c269098549562d289347b2f8
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 16:19:13 2005 -0700

    Rebase #1

commit e8d9fe63116478156180f7026f6c181cc60432c5
Author: A U Thor <author at example.com>
Date:   Thu Apr 7 15:13:13 2005 -0700

    Commit #0
*   ok 1: setup

* expecting success: 
	git repack -a -d &&
	git prune

*   ok 2: pack the source repository

* expecting success: 
	cd victim &&
	git repack -a -d &&
	git prune &&
	cd ..

*   ok 3: pack the destination repository

* expecting success: 
	# should not fail but refuse to update.
	if git-send-pack ./victim/.git/ master
	then
		# now it should fail with Pasky patch
		echo >&2 Gaah, it should have failed.
		false
	else
		echo >&2 Thanks, it correctly failed.
		true
	fi &&
	if cmp victim/.git/refs/heads/master .git/refs/heads/master
	then
		# should have been left as it was!
		false
	else
		true
	fi &&
	# this should update
	git-send-pack --force ./victim/.git/ master &&
	cmp victim/.git/refs/heads/master .git/refs/heads/master

To ./victim/.git/
 ! [rejected]        master -> master (non-fast forward)
Thanks, it correctly failed.
victim/.git/refs/heads/master .git/refs/heads/master differ: char 1, line 1
Counting objects: 325, done.
Compressing objects:   1% (1/65)   
Compressing objects:   3% (2/65)   
Compressing objects:   4% (3/65)   
Compressing objects:   6% (4/65)   
Compressing objects:   7% (5/65)   
Compressing objects:   9% (6/65)   
Compressing objects:  10% (7/65)   
Compressing objects:  12% (8/65)   
Compressing objects:  13% (9/65)   
Compressing objects:  15% (10/65)   
Compressing objects:  16% (11/65)   
Compressing objects:  18% (12/65)   
Compressing objects:  20% (13/65)   
Compressing objects:  21% (14/65)   
Compressing objects:  23% (15/65)   
Compressing objects:  24% (16/65)   
Compressing objects:  26% (17/65)   
Compressing objects:  27% (18/65)   
Compressing objects:  29% (19/65)   
Compressing objects:  30% (20/65)   
Compressing objects:  32% (21/65)   
Compressing objects:  33% (22/65)   
Compressing objects:  35% (23/65)   
Compressing objects:  36% (24/65)   
Compressing objects:  38% (25/65)   
Compressing objects:  40% (26/65)   
Compressing objects:  41% (27/65)   
Compressing objects:  43% (28/65)   
Compressing objects:  44% (29/65)   
Compressing objects:  46% (30/65)   
Compressing objects:  47% (31/65)   
Compressing objects:  49% (32/65)   
Compressing objects:  50% (33/65)   
Compressing objects:  52% (34/65)   
Compressing objects:  53% (35/65)   
Compressing objects:  55% (36/65)   
Compressing objects:  56% (37/65)   
Compressing objects:  58% (38/65)   
Compressing objects:  60% (39/65)   
Compressing objects:  61% (40/65)   
Compressing objects:  63% (41/65)   
Compressing objects:  64% (42/65)   
Compressing objects:  66% (43/65)   
Compressing objects:  67% (44/65)   
Compressing objects:  69% (45/65)   
Compressing objects:  70% (46/65)   
Compressing objects:  72% (47/65)   
Compressing objects:  73% (48/65)   
Compressing objects:  75% (49/65)   
Compressing objects:  76% (50/65)   
Compressing objects:  78% (51/65)   
Compressing objects:  80% (52/65)   
Compressing objects:  81% (53/65)   
Compressing objects:  83% (54/65)   
Compressing objects:  84% (55/65)   
Compressing objects:  86% (56/65)   
Compressing objects:  87% (57/65)   
Compressing objects:  89% (58/65)   
Compressing objects:  90% (59/65)   
Compressing objects:  92% (60/65)   
Compressing objects:  93% (61/65)   
Compressing objects:  95% (62/65)   
Compressing objects:  96% (63/65)   
Compressing objects:  98% (64/65)   
Compressing objects: 100% (65/65)   
Compressing objects: 100% (65/65), done.
Writing objects:   0% (1/325)   
Writing objects:   1% (4/325)   
Writing objects:   2% (7/325)   
Writing objects:   3% (10/325)   
Writing objects:   4% (13/325)   
Writing objects:   5% (17/325)   
Writing objects:   6% (20/325)   
Writing objects:   7% (23/325)   
Writing objects:   8% (26/325)   
Writing objects:   9% (30/325)   
Writing objects:  10% (33/325)   
Writing objects:  11% (36/325)   
Writing objects:  12% (39/325)   
Writing objects:  13% (43/325)   
Writing objects:  14% (46/325)   
Writing objects:  15% (49/325)   
Writing objects:  16% (52/325)   
Writing objects:  17% (56/325)   
Writing objects:  18% (59/325)   
Writing objects:  19% (62/325)   
Writing objects:  20% (65/325)   
Writing objects:  21% (69/325)   
Writing objects:  22% (72/325)   
Writing objects:  23% (75/325)   
Writing objects:  24% (78/325)   
Writing objects:  25% (82/325)   
Writing objects:  26% (85/325)   
Writing objects:  27% (88/325)   
Writing objects:  28% (91/325)   
Writing objects:  29% (95/325)   
Writing objects:  30% (98/325)   
Writing objects:  31% (101/325)   
Writing objects:  32% (104/325)   
Writing objects:  33% (108/325)   
Writing objects:  34% (111/325)   
Writing objects:  35% (114/325)   
Writing objects:  36% (117/325)   
Writing objects:  37% (121/325)   
Writing objects:  38% (124/325)   
Writing objects:  39% (127/325)   
Writing objects:  40% (130/325)   
Writing objects:  41% (134/325)   
Writing objects:  42% (137/325)   
Writing objects:  43% (140/325)   
Writing objects:  44% (143/325)   
Writing objects:  45% (147/325)   
Writing objects:  46% (150/325)   
Writing objects:  47% (153/325)   
Writing objects:  48% (156/325)   
Writing objects:  49% (160/325)   
Writing objects:  50% (163/325)   
Writing objects:  51% (166/325)   
Writing objects:  52% (169/325)   
Writing objects:  53% (173/325)   
Writing objects:  54% (176/325)   
Writing objects:  55% (179/325)   
Writing objects:  56% (182/325)   
Writing objects:  57% (186/325)   
Writing objects:  58% (189/325)   
Writing objects:  59% (192/325)   
Writing objects:  60% (195/325)   
Writing objects:  61% (199/325)   
Writing objects:  62% (202/325)   
Writing objects:  63% (205/325)   
Writing objects:  64% (208/325)   
Writing objects:  65% (212/325)   
Writing objects:  66% (215/325)   
Writing objects:  67% (218/325)   
Writing objects:  68% (221/325)   
Writing objects:  69% (225/325)   
Writing objects:  70% (228/325)   
Writing objects:  71% (231/325)   
Writing objects:  72% (234/325)   
Writing objects:  73% (238/325)   
Writing objects:  74% (241/325)   
Writing objects:  75% (244/325)   
Writing objects:  76% (247/325)   
Writing objects:  77% (251/325)   
Writing objects:  78% (254/325)   
Writing objects:  79% (257/325)   
Writing objects:  80% (260/325)   
Writing objects:  81% (264/325)   
Writing objects:  82% (267/325)   
Writing objects:  83% (270/325)   
Writing objects:  84% (273/325)   
Writing objects:  85% (277/325)   
Writing objects:  86% (280/325)   
Writing objects:  87% (283/325)   
Writing objects:  88% (286/325)   
Writing objects:  89% (290/325)   
Writing objects:  90% (293/325)   
Writing objects:  91% (296/325)   
Writing objects:  92% (299/325)   
Writing objects:  93% (303/325)   
Writing objects:  94% (306/325)   
Writing objects:  95% (309/325)   
Writing objects:  96% (312/325)   
Writing objects:  97% (316/325)   
Writing objects:  98% (319/325)   
Writing objects:  99% (322/325)   
Writing objects: 100% (325/325)   
Writing objects: 100% (325/325), 19.31 KiB, done.
Total 325 (delta 0), reused 325 (delta 0)
To ./victim/.git/
 + fbc8506...b1a1c97 master -> master (forced update)
*   ok 4: pushing rewound head should not barf but require --force

* expecting success: 
	cd victim &&
	git branch extra master &&
	cd .. &&
	test -f victim/.git/refs/heads/extra &&
	git-send-pack ./victim/.git/ :extra master &&
	! test -f victim/.git/refs/heads/extra

To ./victim/.git/
 - [deleted]         extra
*   ok 5: push can be used to delete a ref

* expecting success: 
	cd victim &&
	git config receive.denyNonFastforwards true &&
	cd .. &&
	git update-ref refs/heads/master master^ || return 1
	git-send-pack --force ./victim/.git/ master && return 1
	! git diff .git/refs/heads/master victim/.git/refs/heads/master

Total 0 (delta 0), reused 0 (delta 0)
error: denying non-fast forward refs/heads/master (you should pull first)
To ./victim/.git/
 ! [remote rejected] master -> master (non-fast forward)
diff --git a/.git/refs/heads/master b/victim/.git/refs/heads/master
index 54c94bc..c95688f 100644
--- a/.git/refs/heads/master
+++ b/victim/.git/refs/heads/master
@@ -1 +1 @@
-b1a473533f3c7654e6aabe20b868f403cc4542c4
+b1a1c97e94b6388c108e195d28a3e89f00c81698
*   ok 6: pushing with --force should be denied with denyNonFastforwards

* expecting success: 
	mkdir parent && cd parent &&
	git-init && touch file && git-add file && git-commit -m add &&
	cd .. &&
	git-clone parent child && cd child && git-push --all &&
	cd ../parent &&
	git-branch -a >branches && ! grep -q origin/master branches

Initialized empty Git repository in .git/
Created initial commit 9addffa: add
 0 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 file
Initialized empty Git repository in /build/buildd/git-core-1.5.4.3/t/trash/child/.git/
0 blocks
Everything up-to-date
*   ok 7: pushing does not include non-head refs

* expecting success: 
	rewound_push_setup &&
	if git-send-pack ../parent/.git refs/heads/master:refs/heads/master
	then
		false
	else
		true
	fi && rewound_push_failed &&
	git-send-pack ../parent/.git +refs/heads/master:refs/heads/master &&
	rewound_push_succeeded

Initialized empty Git repository in .git/
Created initial commit 14eeca9: one
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 file
Created commit 43ab524: two
 1 files changed, 1 insertions(+), 1 deletions(-)
Initialized empty Git repository in /build/buildd/git-core-1.5.4.3/t/trash/parent/child/.git/
0 blocks
HEAD is now at 14eeca9... one
To ../parent/.git
 ! [rejected]        master -> master (non-fast forward)
../parent/.git/refs/heads/master .git/refs/heads/master differ: char 1, line 1
Total 0 (delta 0), reused 0 (delta 0)
To ../parent/.git
 + 43ab524...14eeca9 master -> master (forced update)
*   ok 8: pushing explicit refspecs respects forcing

* expecting success: 
	rewound_push_setup &&
	if git-send-pack ../parent/.git refs/heads/*:refs/heads/*
	then
		false
	else
		true
	fi && rewound_push_failed &&
	git-send-pack ../parent/.git +refs/heads/*:refs/heads/* &&
	rewound_push_succeeded

Initialized empty Git repository in .git/
Created initial commit 14eeca9: one
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 file
Created commit 43ab524: two
 1 files changed, 1 insertions(+), 1 deletions(-)
Initialized empty Git repository in /build/buildd/git-core-1.5.4.3/t/trash/parent/child/child/.git/
0 blocks
HEAD is now at 14eeca9... one
To ../parent/.git
 ! [rejected]        master -> master (non-fast forward)
../parent/.git/refs/heads/master .git/refs/heads/master differ: char 1, line 1
Total 0 (delta 0), reused 0 (delta 0)
To ../parent/.git
 + 43ab524...14eeca9 master -> master (forced update)
*   ok 9: pushing wildcard refspecs respects forcing

* passed all 9 test(s)
*** t5401-update-hooks.sh ***
* expecting success: 
	echo This is a test. >a &&
	git update-index --add a &&
	tree0=$(git write-tree) &&
	commit0=$(echo setup | git commit-tree $tree0) &&
	echo We hope it works. >a &&
	git update-index a &&
	tree1=$(git write-tree) &&
	commit1=$(echo modify | git commit-tree $tree1 -p $commit0) &&
	git update-ref refs/heads/master $commit0 &&
	git update-ref refs/heads/tofail $commit1 &&
	git-clone ./. victim &&
	GIT_DIR=victim/.git git update-ref refs/heads/tofail $commit1 &&
	git update-ref refs/heads/master $commit1 &&
	git update-ref refs/heads/tofail $commit0

Initialized empty Git repository in /build/buildd/git-core-1.5.4.3/t/trash/victim/.git/
0 blocks
*   ok 1: setup

* expecting failure: 
	git-send-pack --force ./victim/.git master tofail >send.out 2>send.err

*   ok 2: push

* expecting success: 
	test $(GIT_DIR=victim/.git git rev-parse master) = $commit1 &&
	test $(GIT_DIR=victim/.git git rev-parse tofail) = $commit1

*   ok 3: updated as expected

* expecting success: 
	test -f victim/.git/pre-receive.args &&
	test -f victim/.git/pre-receive.stdin &&
	test -f victim/.git/update.args &&
	test -f victim/.git/update.stdin &&
	test -f victim/.git/post-receive.args &&
	test -f victim/.git/post-receive.stdin &&
	test -f victim/.git/post-update.args &&
	test -f victim/.git/post-update.stdin

*   ok 4: hooks ran

* expecting success: 
	(echo $commit0 $commit1 refs/heads/master;
	 echo $commit1 $commit0 refs/heads/tofail
	) | git diff - victim/.git/pre-receive.stdin

diff --git a/- b/victim/.git/pre-receive.stdin
index 0000000..ef2f4f0 100644
*   ok 5: pre-receive hook input

* expecting success: 
	(echo refs/heads/master $commit0 $commit1;
	 echo refs/heads/tofail $commit1 $commit0
	) | git diff - victim/.git/update.args

diff --git a/- b/victim/.git/update.args
index 0000000..1ca99fb 100644
*   ok 6: update hook arguments

* expecting success: 
	echo $commit0 $commit1 refs/heads/master |
	git diff - victim/.git/post-receive.stdin

diff --git a/- b/victim/.git/post-receive.stdin
index 0000000..7a2e4f4 100644
*   ok 7: post-receive hook input

* expecting success: 
	echo refs/heads/master |
	git diff - victim/.git/post-update.args

diff --git a/- b/victim/.git/post-update.args
index 0000000..0abbd2f 100644
*   ok 8: post-update hook arguments

* expecting success: 
	! test -s victim/.git/update.stdin &&
	! test -s victim/.git/post-update.stdin

*   ok 9: all hook stdin is /dev/null

* expecting success: 
	! test -s victim/.git/pre-receive.args &&
	! test -s victim/.git/post-receive.args

*   ok 10: all *-receive hook args are empty

* expecting failure: 
	test -s send.out

*   ok 11: send-pack produced no output

* expecting success: 
	grep ^STD send.err >actual &&
	git diff - actual <expect

diff --git a/- b/actual
index 0000000..f21c586 100644
*   ok 12: send-pack stderr contains hook messages

* passed all 12 test(s)
*** t5402-post-merge-hook.sh ***
* expecting success: 
	echo Data for commit0. >a &&
	git update-index --add a &&
	tree0=$(git write-tree) &&
	commit0=$(echo setup | git commit-tree $tree0) &&
	echo Changed data for commit1. >a &&
	git update-index a &&
	tree1=$(git write-tree) &&
	commit1=$(echo modify | git commit-tree $tree1 -p $commit0) &&
        git update-ref refs/heads/master $commit0 &&
	git-clone ./. clone1 &&
	GIT_DIR=clone1/.git git update-index --add a &&
	git-clone ./. clone2 &&
	GIT_DIR=clone2/.git git update-index --add a

Initialized empty Git repository in /build/buildd/git-core-1.5.4.3/t/trash/clone1/.git/
0 blocks
Initialized empty Git repository in /build/buildd/git-core-1.5.4.3/t/trash/clone2/.git/
0 blocks
*   ok 1: setup

* expecting failure: 
        GIT_DIR=clone1/.git git merge $commit0 &&
	test -e clone1/.git/post-merge.args

Already up-to-date.
*   ok 2: post-merge does not run for up-to-date 

* expecting success: 
        GIT_DIR=clone1/.git git merge $commit1 &&
	test -e clone1/.git/post-merge.args

Updating e5ef235..858e502
Fast forward
 a |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
*   ok 3: post-merge runs as expected 

* expecting success: 
        grep 0 clone1/.git/post-merge.args

0
*   ok 4: post-merge from normal merge receives the right argument 

* expecting success: 
        GIT_DIR=clone2/.git git merge --squash $commit1 &&
	test -e clone2/.git/post-merge.args

Updating e5ef235..858e502
Fast forward
Squash commit -- not updating HEAD
 a |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
*   ok 5: post-merge from squash merge runs as expected 

* expecting success: 
        grep 1 clone2/.git/post-merge.args

1
*   ok 6: post-merge from squash merge receives the right argument 

* passed all 6 test(s)
*** t5403-post-checkout-hook.sh ***
* expecting success: 
	 echo Data for commit0. >a &&
	 echo Data for commit0. >b &&
	 git update-index --add a &&
	 git update-index --add b &&
	 tree0=$(git write-tree) &&
	 commit0=$(echo setup | git commit-tree $tree0) &&
        git update-ref refs/heads/master $commit0 &&
	 git-clone ./. clone1 &&
	 git-clone ./. clone2 &&
        GIT_DIR=clone2/.git git branch -a new2 &&
        echo Data for commit1. >clone2/b &&
	 GIT_DIR=clone2/.git git add clone2/b &&
	 GIT_DIR=clone2/.git git commit -m new2

Initialized empty Git repository in /build/buildd/git-core-1.5.4.3/t/trash/clone1/.git/
0 blocks
Initialized empty Git repository in /build/buildd/git-core-1.5.4.3/t/trash/clone2/.git/
0 blocks
Created commit 3e02702: new2
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 clone2/b
*   ok 1: setup

* expecting success: 
        GIT_DIR=clone1/.git git checkout master &&
        test -e clone1/.git/post-checkout.args

Already on branch "master"
*   ok 2: post-checkout runs as expected 

* expecting success: 
        old=$(awk "{print \$1}" clone1/.git/post-checkout.args) &&
        new=$(awk "{print \$2}" clone1/.git/post-checkout.args) &&
        flag=$(awk "{print \$3}" clone1/.git/post-checkout.args) &&
        test $old = $new -a $flag = 1

*   ok 3: post-checkout receives the right arguments with HEAD unchanged 

* expecting success: 
        GIT_DIR=clone1/.git git checkout master &&
        test -e clone1/.git/post-checkout.args

Already on branch "master"
*   ok 4: post-checkout runs as expected 

* expecting success: 
        GIT_DIR=clone1/.git git checkout -b new1 &&
        old=$(awk "{print \$1}" clone1/.git/post-checkout.args) &&
        new=$(awk "{print \$2}" clone1/.git/post-checkout.args) &&
        flag=$(awk "{print \$3}" clone1/.git/post-checkout.args) &&
        test $old = $new -a $flag = 1

Switched to a new branch "new1"
*   ok 5: post-checkout args are correct with git checkout -b 

* expecting success: 
        GIT_DIR=clone2/.git git checkout new2 &&
        old=$(awk "{print \$1}" clone2/.git/post-checkout.args) &&
        new=$(awk "{print \$2}" clone2/.git/post-checkout.args) &&
        flag=$(awk "{print \$3}" clone2/.git/post-checkout.args) &&
        test $old != $new -a $flag = 1

Switched to branch "new2"
*   ok 6: post-checkout receives the right args with HEAD changed 

* expecting success: 
        GIT_DIR=clone2/.git git checkout master b &&
        old=$(awk "{print \$1}" clone2/.git/post-checkout.args) &&
        new=$(awk "{print \$2}" clone2/.git/post-checkout.args) &&
        flag=$(awk "{print \$3}" clone2/.git/post-checkout.args) &&
        test $old = $new -a $flag = 0

*   ok 7: post-checkout receives the right args when not switching branches 

* passed all 7 test(s)
*** t5404-tracking-branches.sh ***
* expecting success: 
	echo 1 >file &&
	git add file &&
	git commit -m 1 &&
	git branch b1 &&
	git branch b2 &&
	git clone . aa &&
	git checkout b1 &&
	echo b1 >>file &&
	git commit -a -m b1 &&
	git checkout b2 &&
	echo b2 >>file &&
	git commit -a -m b2

Created initial commit b5b22a9: 1
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 file
Initialized empty Git repository in /build/buildd/git-core-1.5.4.3/t/trash/aa/.git/
0 blocks
Switched to branch "b1"
Created commit bae2e40: b1
 1 files changed, 1 insertions(+), 0 deletions(-)
Switched to branch "b2"
Created commit ed0083e: b2
 1 files changed, 1 insertions(+), 0 deletions(-)
*   ok 1: setup

* expecting success: 
	cd aa &&
	b1=$(git rev-parse origin/b1) &&
	b2=$(git rev-parse origin/b2) &&
	git checkout -b b1 origin/b1 &&
	echo aa-b1 >>file &&
	git commit -a -m aa-b1 &&
	git checkout -b b2 origin/b2 &&
	echo aa-b2 >>file &&
	git commit -a -m aa-b2 &&
	git checkout master &&
	echo aa-master >>file &&
	git commit -a -m aa-master

Branch b1 set up to track remote branch refs/remotes/origin/b1.
Switched to a new branch "b1"
Created commit e717e34: aa-b1
 1 files changed, 1 insertions(+), 0 deletions(-)
Branch b2 set up to track remote branch refs/remotes/origin/b2.
Switched to a new branch "b2"
Created commit 5f6e90e: aa-b2
 1 files changed, 1 insertions(+), 0 deletions(-)
Switched to branch "master"
Created commit a5d7fed: aa-master
 1 files changed, 1 insertions(+), 0 deletions(-)
*   ok 2: prepare pushable branches

* expecting success: ! git push
Counting objects: 5, done.
Writing objects:  33% (1/3)   
Writing objects:  66% (2/3)   
Writing objects: 100% (3/3)   
Writing objects: 100% (3/3), 255 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
To /build/buildd/git-core-1.5.4.3/t/trash/.git
   b5b22a9..a5d7fed  master -> master
 ! [rejected]        b1 -> b1 (non-fast forward)
 ! [rejected]        b2 -> b2 (non-fast forward)
error: failed to push some refs to '/build/buildd/git-core-1.5.4.3/t/trash/.git'
*   ok 3: mixed-success push returns error

* expecting success: 
	test "$(git rev-parse origin/master)" = "$(git rev-parse master)"

*   ok 4: check tracking branches updated correctly after push

* expecting success: 
	test "$(git rev-parse origin/b1)" = "$b1" &&
	test "$(git rev-parse origin/b2)" = "$b2"

*   ok 5: check tracking branches not updated for failed refs

* expecting success: 
	git push origin :b1 &&
	test "$(git rev-parse origin/b1)" = "origin/b1"

To /build/buildd/git-core-1.5.4.3/t/trash/.git
 - [deleted]         b1
fatal: ambiguous argument 'origin/b1': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions
*   ok 6: deleted branches have their tracking branches removed

* passed all 6 test(s)
*** t5405-send-pack-rewind.sh ***
* expecting success: 

	>file1 && git add file1 && test_tick &&
	git commit -m Initial &&

	mkdir another && (
		cd another &&
		git init &&
		git fetch .. master:master
	) &&

	>file2 && git add file2 && test_tick &&
	git commit -m Second


Created initial commit de5945f: Initial
 0 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 file1
Initialized empty Git repository in .git/
warning: no common commits
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0)


More information about the ubuntu-autotest mailing list