Merge branch 'sg/t6500-no-redirect-of-stdin'
authorJunio C Hamano <gitster@pobox.com>
Wed, 30 May 2018 05:04:04 +0000 (14:04 +0900)
committerJunio C Hamano <gitster@pobox.com>
Wed, 30 May 2018 05:04:04 +0000 (14:04 +0900)
Test cleanup.

* sg/t6500-no-redirect-of-stdin:
t6050-replace: don't disable stdin for the whole test script

1  2 
t/t6050-replace.sh
diff --combined t/t6050-replace.sh
index d174bfed309c1adf5cfbafc7b9cc6a6b1c6033ee,199fbc78a39f8d3646e700dd28480e19f49ea5db..aa3e24963967ba4be2394ceeab26f8317fb31b4b
@@@ -4,8 -4,6 +4,6 @@@
  #
  test_description='Tests replace refs functionality'
  
- exec </dev/null
  . ./test-lib.sh
  . "$TEST_DIRECTORY/lib-gpg.sh"
  
@@@ -444,32 -442,4 +442,32 @@@ test_expect_success GPG '--graft on a c
        git replace -d $HASH10
  '
  
 +test_expect_success '--convert-graft-file' '
 +      git checkout -b with-graft-file &&
 +      test_commit root2 &&
 +      git reset --hard root2^ &&
 +      test_commit root1 &&
 +      test_commit after-root1 &&
 +      test_tick &&
 +      git merge -m merge-root2 root2 &&
 +
 +      : add and convert graft file &&
 +      printf "%s\n%s %s\n\n# comment\n%s\n" \
 +              $(git rev-parse HEAD^^ HEAD^ HEAD^^ HEAD^2) \
 +              >.git/info/grafts &&
 +      git replace --convert-graft-file &&
 +      test_path_is_missing .git/info/grafts &&
 +
 +      : verify that the history is now "grafted" &&
 +      git rev-list HEAD >out &&
 +      test_line_count = 4 out &&
 +
 +      : create invalid graft file and verify that it is not deleted &&
 +      test_when_finished "rm -f .git/info/grafts" &&
 +      echo $EMPTY_BLOB $EMPTY_TREE >.git/info/grafts &&
 +      test_must_fail git replace --convert-graft-file 2>err &&
 +      test_i18ngrep "$EMPTY_BLOB $EMPTY_TREE" err &&
 +      test_i18ngrep "$EMPTY_BLOB $EMPTY_TREE" .git/info/grafts
 +'
 +
  test_done