Re: [PATCH] Use reflog in 'pull --rebase . foo'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Nov 13, 2010 at 12:20 PM, Santi BÃjar <santi@xxxxxxxxxxx> wrote:
> On Sat, Nov 13, 2010 at 1:09 PM, Martin von Zweigbergk
> <martin.von.zweigbergk@xxxxxxxxx> wrote:
>> diff --git a/git-parse-remote.sh b/git-parse-remote.sh
>> index 5f47b18..2e1661d 100644
>> --- a/git-parse-remote.sh
>> +++ b/git-parse-remote.sh
>> @@ -63,11 +63,8 @@ get_default_remote () {
>> Âget_remote_merge_branch () {
>> Â Â Â Âcase "$#" in
>> Â Â Â Â0|1)
>> - Â Â Â Â Â origin="$1"
>> - Â Â Â Â Â default=$(get_default_remote)
>> - Â Â Â Â Â test -z "$origin" && origin=$default
>> Â Â Â Â Â Âcurr_branch=$(git symbolic-ref -q HEAD)
>> - Â Â Â Â Â [ "$origin" = "$default" ] &&
>> + Â Â Â Â Â test -z "$1" || test "$1" = $(get_default_remote) &&
>> Â Â Â Â Â Âecho $(git for-each-ref --format='%(upstream)' $curr_branch)
>> Â Â Â Â Â Â;;
>> Â Â Â Â*)
>
> They are not equivalent, the last line (echo $(git for-each-ref...))
> is always executed, not only when ask for the default remote. When
> $origin != $default the last line does not return the correct answer.
> It should return nothing, it is not well defined. Or maybe it should
> return the branch pointed by $origin/HEAD (I cannot test right now
> what 'git pull $remote-not-the-default' merges).
>
> And it has nothing to do with letting 'pull --rebase . for" work.

You are right, of course. I think I was modifying the code to try to
understand how it behaved and it should not have been part of the patch.
Sorry about that.

Junio, will you just exclude that hunk?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]