Re: [PATCH 7/7] sha1_name: implement finding @{push}

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

 



On Fri, May 24, 2013 at 11:15 PM, Ramkumar Ramachandra
<artagnon@xxxxxxxxx> wrote:
> Duy Nguyen wrote:
>> On Thu, May 23, 2013 at 10:12 PM, Ramkumar Ramachandra
>> <artagnon@xxxxxxxxx> wrote:
>>> Try this now: configure your current branch's pushremote to push to
>>> "refs/heads/*:refs/heads/rr/*".  Now, type 'git show @{p}'.  Voila!
>>
>> Voila what? Why not avoid guessing game and describe what the patch is for?
>
> If you're on branch master, it'll output refs/heads/rr/master.  The
> topic is about having a @{push} corresponding to @{upstream}

Then "show @{p}" should show the tip commit of rr/master, not the ref
name. rev-parse (with an option, maybe) may be a better place for
this.

>>> +       dst_name = get_ref_match(remote->push, remote->push_refspec_nr,
>>> +                               this_ref, MATCH_REFS_ALL, 0, &pat);
>>> +       printf("dst_name = %s\n", dst_name);
>>> +}
>>> +
>>
>> Isn't this an abuse of extended sha-1 syntax? How can I combine this
>> with other @{}, ^, ~...?
>
> I'm unsure what you mean.  How can I be on branch master^1?  Did you
> read the cover-letter?

I did not expect @{p} to printf(). If it's part of get_sha1(), how can
it return an sha-1? And the cover letter said "7/7 is the meat". Not
very informative.
--
Duy
--
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]