summaryrefslogtreecommitdiff
path: root/git-remote-testgit
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-05-29 14:20:16 -0700
committerJunio C Hamano <gitster@pobox.com>2013-05-29 14:20:16 -0700
commit766f0f8ef755eeb7a79b87af9bc348a1ba824589 (patch)
tree9dac92f055cbb0c7f74eba1ea0cb6ab91d8fb5b6 /git-remote-testgit
parentedca4152560522a431a51fc0a06147fc680b5b18 (diff)
parent126aac5cf3b5696481aafe840f8f596653087d8b (diff)
downloadgit-766f0f8ef755eeb7a79b87af9bc348a1ba824589.tar.gz
Merge branch 'fc/transport-helper-error-reporting'
Update transport helper to report errors and maintain ref hierarchy used to keep track of remote helper state better. * fc/transport-helper-error-reporting: transport-helper: fix remote helper namespace regression test: remote-helper: add missing and t5801: "VAR=VAL shell_func args" is forbidden transport-helper: update remote helper namespace transport-helper: trivial code shuffle transport-helper: warn when refspec is not used transport-helper: clarify pushing without refspecs transport-helper: update refspec documentation transport-helper: clarify *:* refspec transport-helper: improve push messages transport-helper: mention helper name when it dies transport-helper: report errors properly
Diffstat (limited to 'git-remote-testgit')
-rwxr-xr-xgit-remote-testgit26
1 files changed, 25 insertions, 1 deletions
diff --git a/git-remote-testgit b/git-remote-testgit
index e7ed3a33e6..2b865deeb1 100755
--- a/git-remote-testgit
+++ b/git-remote-testgit
@@ -62,12 +62,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
@@ -79,7 +98,12 @@ do
while read ref a b
do
test $a == $b && continue
- echo "ok $ref"
+ if test -z "$GIT_REMOTE_TESTGIT_PUSH_ERROR"
+ then
+ echo "ok $ref"
+ else
+ echo "error $ref $GIT_REMOTE_TESTGIT_PUSH_ERROR"
+ fi
done
echo