@matheusbsbs / matheus-bagliano / commits / a72f9373c0
Fork 0

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>

Junio C Hamano committed Jul 12, 2006 at 23:00 UTC a72f9373c01f9bbebd14af7cec6ff0de4c27c578
1 file changed +3 -1
git-repack.sh
+3 -1
@@ -43,7 +43,9 @@ case ",$all_into_one," in
43 ;;
44 esac
45 pack_objects="$pack_objects $local $quiet $no_reuse_delta$extra"
46 -name=$(git-rev-list --objects --all $rev_list 2>&1 |
46 +name=$( { git-rev-list --objects --all $rev_list ||
47 + echo "git-rev-list died with exit code $?"
48 + } |
49 git-pack-objects --non-empty $pack_objects .tmp-pack) ||
50 exit 1
51 if [ -z "$name" ]; then