Re: [PATCHv3] parse-remote: handle detached HEAD

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

 



On Mon, Dec 6, 2010 at 11:20 AM, Santi Béjar <santi@xxxxxxxxxxx> wrote:
> get_remote_merge_branch with zero or one arguments returns the
> upstream branch. But a detached HEAD does no have an upstream branch,
> as it is not tracking anything. Handle this case testing the exit code
> of "git symbolic-ref -q HEAD".
>
> Reported-by: Sverre Rabbelier <srabbelier@xxxxxxxxx>
> Signed-off-by: Santi Béjar <santi@xxxxxxxxxxx>
> ---
>
>> If that is the case, shouldn't we be not calling "echo" at all to begin
>> with?  IOW, shouldn't the code read more like this?
>>
>>        curr_branch=$(git symbolic-ref -q HEAD) &&
>>        test "$origin" = "$default" &&
>>        echo ...
>
> Or course, you are right. I didn't know/think about the exit
> code... Thanks.

Now that I think of... the final form of the patch is yours (Junio).
Feel free to add something like this to the commit message:

Final patch form by Junio C Hamano

Or alternatively, take ownership of the patch and add something like
"Patch handled by Santi Béjar but final patch form by Junio C Hamano"
and:

Acked-by: Santi Béjar <santi@xxxxxxxxxxx>

Santi
--
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]