git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* $> git branch splat response considered harmful
@ 2019-08-08 21:08 jim.cromie
  2019-08-08 21:20 ` Bryan Turner
  2019-08-08 21:30 ` SZEDER Gábor
  0 siblings, 2 replies; 6+ messages in thread
From: jim.cromie @ 2019-08-08 21:08 UTC (permalink / raw)
  To: git

fwiw,

jimc@frodo:~/prj-1/capnproto.git$ git branch -l
* master

I find the splat in the response unhelpful
when wrapped in shell for loop, the splat expands into everything in
current directory

jimc@frodo:~/prj-1/capnproto.git$ for b in `git branch -l`; do echo $b; done
appveyor.yml
c++
CMakeLists.txt
CONTRIBUTORS
...

it would be nice if some flag combo would suppress that splat.
save me from fugly brittle sh $IFS fiddlery and incomplete workarounds

git branch -l  # no splat
  master
git branch # splat ok for back-compat (if you think it necessary)
  * master

it appears that by convention, checked out branch is both 1st in list,
and splatted,
perhaps _DIRTY_, JUNK, or maybe "" would be good 1st line of response
if not on a branch ?

also, I found no mention of the splat in the man page.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-08-09 18:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-08 21:08 $> git branch splat response considered harmful jim.cromie
2019-08-08 21:20 ` Bryan Turner
2019-08-08 21:28   ` Emily Shaffer
2019-08-08 21:46     ` Junio C Hamano
2019-08-09 18:01     ` Philip Oakley
2019-08-08 21:30 ` SZEDER Gábor

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).