Merge branch 'jc/maint-test-portability' into 'jc/test-portability'
authorJunio C Hamano <gitster@pobox.com>
Wed, 19 Dec 2012 15:46:05 +0000 (07:46 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 19 Dec 2012 15:46:05 +0000 (07:46 -0800)
* jc/maint-test-portability:
t4014: fix arguments to grep
t9502: do not assume GNU tar
t0200: "locale" may not exist

1  2 
t/t4014-format-patch.sh
diff --combined t/t4014-format-patch.sh
index 16a4ca1d6061122cf7ed3abd68390e27794f79b0,e47efc37daba2779ab00637145508bab78dda16b..90fd598c747482354c7fa1a9fa281c26c06e9de8
@@@ -155,7 -155,7 +155,7 @@@ test_expect_failure 'additional comman
        git config --replace-all format.headers "Cc: R E Cipient <rcipient@example.com>" &&
        git format-patch --cc="S. E. Cipient <scipient@example.com>" --stdout master..side | sed -e "/^\$/q" >patch5 &&
        grep "^Cc: R E Cipient <rcipient@example.com>,\$" patch5 &&
-       grep "^ *"S. E. Cipient" <scipient@example.com>\$" patch5
+       grep "^ *\"S. E. Cipient\" <scipient@example.com>\$" patch5
  '
  
  test_expect_success 'command line headers' '
@@@ -183,7 -183,7 +183,7 @@@ test_expect_success 'command line To: h
  test_expect_failure 'command line To: header (rfc822)' '
  
        git format-patch --to="R. E. Cipient <rcipient@example.com>" --stdout master..side | sed -e "/^\$/q" >patch8 &&
-       grep "^To: "R. E. Cipient" <rcipient@example.com>\$" patch8
+       grep "^To: \"R. E. Cipient\" <rcipient@example.com>\$" patch8
  '
  
  test_expect_failure 'command line To: header (rfc2047)' '
@@@ -203,7 -203,7 +203,7 @@@ test_expect_failure 'configuration To: 
  
        git config format.to "R. E. Cipient <rcipient@example.com>" &&
        git format-patch --stdout master..side | sed -e "/^\$/q" >patch9 &&
-       grep "^To: "R. E. Cipient" <rcipient@example.com>\$" patch9
+       grep "^To: \"R. E. Cipient\" <rcipient@example.com>\$" patch9
  '
  
  test_expect_failure 'configuration To: header (rfc2047)' '
@@@ -650,19 -650,8 +650,19 @@@ test_expect_success 'format-patch --in-
  '
  
  test_expect_success 'format-patch --signoff' '
 -      git format-patch -1 --signoff --stdout |
 -      grep "^Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>"
 +      git format-patch -1 --signoff --stdout >out &&
 +      grep "^Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>" out
 +'
 +
 +test_expect_success 'format-patch --notes --signoff' '
 +      git notes --ref test add -m "test message" HEAD &&
 +      git format-patch -1 --signoff --stdout --notes=test >out &&
 +      # Three dashes must come after S-o-b
 +      ! sed "/^Signed-off-by: /q" out | grep "test message" &&
 +      sed "1,/^Signed-off-by: /d" out | grep "test message" &&
 +      # Notes message must come after three dashes
 +      ! sed "/^---$/q" out | grep "test message" &&
 +      sed "1,/^---$/d" out | grep "test message"
  '
  
  echo "fatal: --name-only does not make sense" > expect.name-only