X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft4013-diff-various.sh;h=ed37141b6e5afd8294c5961a1ab96c634a5f4a82;hb=8232dc427fb4b92b38e74e9e93b52231a67e354f;hp=06837d1c7c053e9b4a97f120754fec22c50b2bd3;hpb=49b2788539016e7fd20559bea11b306ade0183b7;p=git.git diff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh index 06837d1c7..ed37141b6 100755 --- a/t/t4013-diff-various.sh +++ b/t/t4013-diff-various.sh @@ -7,6 +7,9 @@ test_description='Various diff formatting options' . ./test-lib.sh +LF=' +' + test_expect_success setup ' GIT_AUTHOR_DATE="2006-06-26 00:00:00 +0000" && @@ -31,7 +34,7 @@ test_expect_success setup ' 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 && + 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" && @@ -70,7 +73,8 @@ test_expect_success setup ' for i in 1 2; do echo $i; done >>dir/sub && git update-index file0 dir/sub && - EDITOR=: VISUAL=: git commit --amend && + git repo-config log.showroot false && + git commit --amend && git show-branch ' @@ -85,7 +89,7 @@ test_expect_success setup ' +*+ [initial] Initial EOF -V=`git version | sed -e 's/^git version //'` +V=`git version | sed -e 's/^git version //' -e 's/\./\\./g'` while read cmd do case "$cmd" in @@ -100,7 +104,9 @@ do test_expect_success "git $cmd" ' { echo "\$ git $cmd" - git $cmd | sed -e "s/$V/g-i-t--v-e-r-s-i-o-n/" + git $cmd | + sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \ + -e "s/^\\( *boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/" echo "\$" } >"$actual" && if test -f "$expect"