Re: [PATCH] pull: fix 'git pull --all' when current branch is tracking remote that is not last in the list of remotes
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 23, 2010, 23:02 UTC
- Message-ID
- <7vtyt75zdo.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <1266965731-4208-1-git-send-email-michael.lukashov@gmail.com>
Michael Lukashov <michael.lukashov@gmail.com> writes:
Show 13 quoted lines
> diff --git a/git-pull.sh b/git-pull.sh
> index 38331a8..fcde096 100755
> --- a/git-pull.sh
> +++ b/git-pull.sh
> @@ -214,7 +214,11 @@ test true = "$rebase" && {
> done
> }
> orig_head=$(git rev-parse -q --verify HEAD)
> -git fetch $verbosity --update-head-ok "$@" || exit 1
> +if test -e "$GIT_DIR"/FETCH_HEAD
> +then
> + rm "$GIT_DIR"/FETCH_HEAD 2>/dev/null
> +fiWhen is it sane to ignore an error from this "rm", especially after you made sure that it exists?