Re: git-branch --print-current

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

 



>>>>> On 2009-01-04 00:21 PST, Arnaud Lacombe writes:

    Arnaud> FWIW, I had this in a stalled modification in a tree,
    Arnaud> it just add the '-c' (as "current") option to git
    Arnaud> branch. Patch is mostly for the record :/

Thanks, glad someone else wanted this too.  If we modified
git-symbolic-ref it would probably be less code since it doesn't
have to loop over all branches, though from a UI perspective I
still prefer git-branch.  Anyway doesn't look like people like the
idea so how about that git-rev-parse --symbolic-abbrev-name idea
:)

    Arnaud> The main trouble I have with pipe stuff is that it
    Arnaud> forks a process for something that can be done
    Arnaud> natively. Previously, I was using awk(1) to extract
    Arnaud> the current branch:

    Arnaud> $ git branch | awk '/^\*/ {print $2}'

Yet another addition to the list of ways to pipeline it, this one
probably the shortest :)

[BTW, your patch mime type was application/octet-stream :(]


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

  Powered by Linux