People use "git branch | sed -ne 's/^\* //p' in their scripts (you can say
"against recommendation" but I think it is a sign that the recommendation
against use of Porcelain in the scripts is not loud enough). I do not
think anybody greps in "git branch -a", though, for that purpose.
The current "branch -a" output is a mess. It omits "remotes/" even though
it includes the local ones in the output. Perhaps with remotes/, the
output may become a bit more readable:
$ git branch -a
* master
next
pu
* remotes/dscho/master
* remotes/origin/master
remotes/origin/next
remotes/origin/pu
* remotes/spearce/master
which may still be too loud with asterisks, but at least there is no
confusion. Or perhaps like this:
$ git branch -a
* master
next
pu
remotes/dscho/HEAD -> master
remotes/dscho/master
remotes/origin/HEAD -> master
remotes/origin/master
remotes/origin/next
remotes/origin/pu
remotes/spearce/HEAD -> master
remotes/spearce/master
with an obvious twist when there is no mixed output:
$ git branch -r
dscho/HEAD -> master
dscho/master
origin/HEAD -> master
origin/master
origin/next
origin/pu
spearce/HEAD -> master
spearce/master
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html