From: Linus Torvalds Date: Tue, 19 Apr 2005 16:53:58 +0000 (-0700) Subject: Make git-pull-script do the right thing for symlinked HEAD's. X-Git-Tag: v0.99~813 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4aaef1064a1091ec38ab6adc823f26b82cf4998d;p=git.git 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. --- diff --git a/git-pull-script b/git-pull-script index b873203cc..43114167a 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)