Re: git-branch --print-current
- From
- Karl Chen <quarl@cs.berkeley.edu>
- Date
- Jan 4, 2009, 12:40 UTC
- Message-ID
- <quack.20090104T0440.lthbpun1bxo@roar.cs.berkeley.edu>
- In-Reply-To
- <1a69a9d80901040021i1dae2c6j7337cf57eed6476a@mail.gmail.com>
>>>>> 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 :(]