Hi, On Sun, Jan 4, 2009 at 7:49 AM, demerphq <demerphq@xxxxxxxxx> wrote: > 2009/1/4 Karl Chen <quarl@xxxxxxxxxxxxxxx>: >> On 2009-01-04 00:21 PST, Arnaud Lacombe writes: >> Arnaud> $ git branch | awk '/^\*/ {print $2}' >> >> Yet another addition to the list of ways to pipeline it, this one >> probably the shortest :) > > Unfortunately it doesnt work well when you arent on a branch: > > $ git branch | awk '/^\*/ {print $2}' > (no > > So far two apparently expert git people have given solutions to this > problem that don't elegantly handle the edge cases. > my bad: $ git branch | awk '/^\*/ {print substr($0, 3)}' - Arnaud -- 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