X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=t%2Ft4013-diff-various.sh;h=3d85ceaae9e695d7b03d09cb082f1eef4f8406f2;hb=88459358cdd70246e805b0ee7db7fffb9564f80e;hp=026832761f9a2cc3436a083ac9f28b2d9deebd49;hpb=f3bc46821263cfc2ab41b561727da4592ae5ea3b;p=git.git diff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh index 026832761..3d85ceaae 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 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" @@ -233,6 +239,15 @@ format-patch --attach --stdout initial..side format-patch --attach --stdout initial..master^ format-patch --attach --stdout initial..master +diff --abbrev initial..side +diff -r initial..side +diff --stat initial..side +diff -r --stat initial..side +diff initial..side +diff --patch-with-stat initial..side +diff --patch-with-raw initial..side +diff --patch-with-stat -r initial..side +diff --patch-with-raw -r initial..side EOF test_done