[PATCH 0/5] interpret_branch_name bug potpourri

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

 



On Wed, Jan 15, 2014 at 12:00:03AM -0500, Jeff King wrote:

>   $ git rev-parse --symbolic-full-name HEAD@{u}
>   refs/remotes/origin/master
>   $ git rev-parse --symbolic-full-name @mybranch@{u}
>   @mybranch@{u}
>   fatal: ambiguous argument '@mybranch@{u}': unknown revision or path
>   not in the working tree.
> 
> So I do think there is a bug. The interpret_branch_name parser somehow
> gets confused by the "@" in the name.

The "somehow" is because we only look for the first "@", and never
consider any possible marks after that. The series below fixes it, along
with two other bugs I found while looking at this code. Ugh. Remind me
never to look at our object name parser ever again.

I feel pretty good that this is fixing real bugs and not regressing
anything else. I would not be surprised if there are other weird things
lurking, though. See the discussion in patch 4.

  [1/5]: interpret_branch_name: factor out upstream handling
  [2/5]: interpret_branch_name: rename "cp" variable to "at"
  [3/5]: interpret_branch_name: always respect "namelen" parameter
  [4/5]: interpret_branch_name: avoid @{upstream} past colon
  [5/5]: interpret_branch_name: find all possible @-marks

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