Re: [PATCH 6/6] pull: trivial cleanup
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- Aug 31, 2013, 07:56 UTC
- Message-ID
- <CAMP44s3X6au7iG3O31HZn_kvcjU-AJa+pnMci+FQ0vaDPvjOsA@mail.gmail.com>
- In-Reply-To
- <xmqq38pqwlyl.fsf@gitster.dls.corp.google.com>
On Fri, Aug 30, 2013 at 10:58 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 29 quoted lines
> Felipe Contreras <felipe.contreras@gmail.com> writes:
>
>> There's no need to remove 'refs/heads/' yet again.
>>
>> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
>> ---
>> git-pull.sh | 3 +--
>> 1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/git-pull.sh b/git-pull.sh
>> index f0df41c..3bdcbfd 100755
>> --- a/git-pull.sh
>> +++ b/git-pull.sh
>> @@ -166,7 +166,6 @@ error_on_no_merge_candidates () {
>> op_prep=with
>> fi
>>
>> - curr_branch=${curr_branch#refs/heads/}
>
> The code assumes that at this point $curr_branch has the result of
> git symbolic-ref -q HEAD it did at the beginning, before it entered
> in the command line parsing loop. But immediately after it, the
> code sets up $curr_branch_short for the value this code computes.
>
>> upstream=$(git config "branch.$curr_branch.merge")
>> remote=$(git config "branch.$curr_branch.remote")
>
> So it appears to me that the above two lines that are not updated
> would introduce a regression. Am I missing something trivial?Yes, I'm not exactly sure where from which branch I got this change, but those lines were removed. They should be updated.
-- Felipe Contreras