$> git branch splat response considered harmful
- From
- jim.cromie@gmail.com <jim.cromie@gmail.com>
- Date
- Aug 8, 2019, 21:08 UTC
- Message-ID
- <CAJfuBxx5R28cjUj1v+mB4J+uUpbTMWnYowrCc=iOAbOcqWX-_w@mail.gmail.com>
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.