Re: [PATCH 1/2] t1506: more test for @{upstream} syntax

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

 



Jeff King <peff@xxxxxxxx> writes:

> Using "git show @{-1}@{u}" is still broken, though.
>
> I tried tracing the parsing through get_sha1_basic and
> interpret_branch_name, but it's pretty confusing. Especially as we seem
> to deal with @{upstream}, @{now}, and @{-1} at different places.
>
> I think the patch below does what we want, but the whole thing feels
> overly complicated to me, especially with the split of parsing @{...}
> between get_sha1_basic and interpret_branch_name. I guess we have spots
> that don't take reflogs but do take branch names, but I think the code
> would be much simpler if the syntax were parsed in one place, and then
> we threw out or complained about bogus semantics (like "checkout
> @{now}").

I wanted to do something like what your patch does by iterating over the
input inside get_sha1_basic() while we still see @{...}, parsing pieces
from the beginning, not from the end like the original "do we have the
reflog indicator at the end?  If so strip it and deal with what we have at
the front".  Your patch to i-b-n does that by recursing inside, which is a
nice solution.

Care to roll a patch with additional tests, to build on top of 105e473
(Fix log -g this@{upstream}, 2010-01-26)?
--
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]