Re: [PATCH] pull: fix 'git pull --all' when current branch is tracking remote that is not last in the list of remotes
- From
Michael Lukashov <michael.lukashov@gmail.com>
- Date
- Feb 23, 2010, 23:44 UTC
- Message-ID
- <63cde7731002231544k4140d0d8u65e8c7250a8ff42c@mail.gmail.com>
- In-Reply-To
- <7vtyt75zdo.fsf@alter.siamese.dyndns.org>
On Wed, Feb 24, 2010 at 2:02 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 19 quoted lines
> Michael Lukashov <michael.lukashov@gmail.com> writes:
>
>> 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
>> +fi
>
> When is it sane to ignore an error from this "rm", especially after you
> made sure that it exists?
>The file "$GIT_DIR"/FETCH_HEAD is rewritten in subsequent call to 'git fetch', thus it is safe to ignore all errors.