summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org.(none)>2005-04-19 16:53:58 (GMT)
committerLinus Torvalds <torvalds@ppc970.osdl.org.(none)>2005-04-19 16:53:58 (GMT)
commit4aaef1064a1091ec38ab6adc823f26b82cf4998d (patch)
tree2cc561c8cd57aefc641f5ff8b5719377b08763ad
parent3b7d368f34715003c834233d9f23456bcb62b44a (diff)
downloadgit-4aaef1064a1091ec38ab6adc823f26b82cf4998d.zip
git-4aaef1064a1091ec38ab6adc823f26b82cf4998d.tar.gz
git-4aaef1064a1091ec38ab6adc823f26b82cf4998d.tar.bz2
Make git-pull-script do the right thing for symlinked HEAD's.
Also exit gracefully if the HEAD pull failed, rather than use a possibly stale MERGE_HEAD.
-rwxr-xr-xgit-pull-script4
1 files changed, 3 insertions, 1 deletions
diff --git a/git-pull-script b/git-pull-script
index b873203..4311416 100755
--- a/git-pull-script
+++ b/git-pull-script
@@ -5,11 +5,13 @@
#
merge_repo=$1
+rm -f .git/MERGE_HEAD
+
echo "Getting object database"
rsync -avz --ignore-existing $merge_repo/objects/. .git/objects/.
echo "Getting remote head"
-rsync -avz $merge_repo/HEAD .git/MERGE_HEAD
+rsync -L $merge_repo/HEAD .git/MERGE_HEAD || exit 1
head=$(cat .git/HEAD)
merge_head=$(cat .git/MERGE_HEAD)