Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-07-13 10:00:46 +0400
committerJunio C Hamano <junkio@cox.net>2006-07-13 10:00:46 +0400
commita72f9373c01f9bbebd14af7cec6ff0de4c27c578 (patch)
treed75072db04dc523010c087a3e8692696df9eb2e8 /git-repack.sh
parent869659a6a1010ea0943329113a1de41c38bd4a00 (diff)
git-repack: avoid redirecting stderr into git-pack-objects
We are trying to catch error condition of git-rev-list and cause the downstream pack-objects to barf, but if you run rev-list with anything that mucks with its stderr (such as GIT_TRACE), any stderr output would cause the pipeline to fail. [jc: originally from Matthias Lederhofer, with a reworded error message.] Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-repack.sh')
-rwxr-xr-xgit-repack.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/git-repack.sh b/git-repack.sh
index 640ad8d90b..9da92fb061 100755
--- a/git-repack.sh
+++ b/git-repack.sh
@@ -43,7 +43,9 @@ case ",$all_into_one," in
;;
esac
pack_objects="$pack_objects $local $quiet $no_reuse_delta$extra"
-name=$(git-rev-list --objects --all $rev_list 2>&1 |
+name=$( { git-rev-list --objects --all $rev_list ||
+ echo "git-rev-list died with exit code $?"
+ } |
git-pack-objects --non-empty $pack_objects .tmp-pack) ||
exit 1
if [ -z "$name" ]; then