diff options
Diffstat (limited to 'git-remote-testgit')
-rwxr-xr-x | git-remote-testgit | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/git-remote-testgit b/git-remote-testgit index b395c8de59..5fd09f965a 100755 --- a/git-remote-testgit +++ b/git-remote-testgit @@ -61,12 +61,31 @@ do echo "feature import-marks=$gitmarks" echo "feature export-marks=$gitmarks" fi + + if test -n "$GIT_REMOTE_TESTGIT_FAILURE" + then + echo "feature done" + exit 1 + fi + echo "feature done" git fast-export "${testgitmarks_args[@]}" $refs | sed -e "s#refs/heads/#${prefix}/heads/#g" echo "done" ;; export) + if test -n "$GIT_REMOTE_TESTGIT_FAILURE" + then + # consume input so fast-export doesn't get SIGPIPE; + # git would also notice that case, but we want + # to make sure we are exercising the later + # error checks + while read line; do + test "done" = "$line" && break + done + exit 1 + fi + before=$(git for-each-ref --format='%(refname) %(objectname)') git fast-import "${testgitmarks_args[@]}" --quiet |