From da70c2af5ed1fa7a950a37379ba1f09dbb173640 Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Feb 10 2012 08:39:57 +0000 Subject: fix make-git-snapshot.sh for git >= 1.7.9 Since git-1.7.9 it is not permitted to use 'git archive --remote=...' with arbitrary sha1 refs. Only named refs are allowed. See this git commit in git :-) : ee27ca4a7 archive: don't let remote clients get unreachable commits --- diff --git a/make-git-snapshot.sh b/make-git-snapshot.sh index b4726c8..38bfbf3 100755 --- a/make-git-snapshot.sh +++ b/make-git-snapshot.sh @@ -15,14 +15,15 @@ trap 'rm -rf $WORKDIR' exit git clone $REFERENCE "$UPSTREAM" "$WORKDIR" pushd "$WORKDIR" > /dev/null -read COMMIT_ID COMMIT_SHORTID COMMIT_TITLE < /dev/null echo "Making git snapshot using commit: $COMMIT_SHORTID $COMMIT_TITLE" DIRNAME="$NAME-git$COMMIT_SHORTID" -git archive --remote="$WORKDIR" --format=tar --prefix="$DIRNAME/" "$COMMIT_ID" | xz -9 > "$DIRNAME.tar.xz" +git archive --remote="$WORKDIR" --format=tar --prefix="$DIRNAME/" to-archive | xz -9 > "$DIRNAME.tar.xz" echo "Written $DIRNAME.tar.xz"