Re: [PATCH, 4th version] git-branch: register where to merge from, when branching off a remote branch

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

 



Hi,

On Fri, 2 Mar 2007, Paolo Bonzini wrote:

> >>>> +	else if (dwim_ref(start_name, strlen(start_name), sha1, &real_ref))
> >>>> +		remote = !prefixcmp(real_ref, "refs/remotes/");
> >>>  - (pure question) What happens if dwim_ref() returns more than one?
> >> Then, real_ref is the one matching sha1.
> > 
> > Which one ;-)
> 
> Matching "the variable named" sha1. :-)
> 
> > What Junio tried to get at: if you have "refs/heads/my" and 
> > "refs/remotes/origin/my", dwim_ref("my", ...) returns 2 (or even more, 
> > if you have other refs ending in "/my").
> 
> But the sha1 and the real_ref are always consistent.  If I get 
> refs/heads/my (and a non-remote will always override the remote), the 
> sha1 is non remote.  If I get refs/remotes/origin/my (which triggers the 
> magic), the sha1 is remote.

Okay, but you can have "refs/remotes/origin/my" and 
"refs/remotes/paolo/my".

> Still, let's put this patch on hold, I have to understand more about git 
> before proposing something that is clearly beyond my knowledge (as the 
> criticism shows).

I think you are doing fine. Since there is a lot of discussion about this 
feature, it does clearly not fail the mark. A little bit more work, and it 
is ready for inclusion IMHO.

Ciao,
Dscho

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