Re: git branch command is incompatible with bash

2015-07-28 Thread Scott Schmit
On Tue, Jul 28, 2015 at 08:23:40AM -0700, Junio C Hamano wrote: > Johannes Sixt writes: > > Are you trying to say that the result of 'rev-parse --abbrev-ref HEAD' > > is suboptimal and that of 'symbolic-ref --short HEAD' is OK? > > My "Interesting" was primarily about that I wasn't aware of the >

Re: git branch command is incompatible with bash

2015-07-28 Thread Johannes Sixt
Am 28.07.2015 um 17:23 schrieb Junio C Hamano: Johannes Sixt writes: Are you trying to say that the result of 'rev-parse --abbrev-ref HEAD' is suboptimal and that of 'symbolic-ref --short HEAD' is OK? My "Interesting" was primarily about that I wasn't aware of the "--abbrev-ref" option. Yes

Re: git branch command is incompatible with bash

2015-07-28 Thread Jeff King
On Tue, Jul 28, 2015 at 08:23:40AM -0700, Junio C Hamano wrote: > I can see that "symbolic-ref --short" is much newer than the other > one, so addition of "--abbrev-ref" to "rev-parse" may have been a > mistake made while being desperate (i.e. not having a way to do so > with plumbing, we wanted "

Re: git branch command is incompatible with bash

2015-07-28 Thread Junio C Hamano
Johannes Sixt writes: > Are you trying to say that the result of 'rev-parse --abbrev-ref HEAD' > is suboptimal and that of 'symbolic-ref --short HEAD' is OK? My "Interesting" was primarily about that I wasn't aware of the "--abbrev-ref" option. Yes, I am sure some time ago I accepted a patch to

Re: git branch command is incompatible with bash

2015-07-28 Thread Jakub Narębski
W dniu 2015-07-28 o 09:28, Johannes Sixt pisze: Am 27.07.2015 um 23:49 schrieb Junio C Hamano: Johannes Sixt writes: Try branchName=$(git rev-parse --abbrev-ref HEAD) Hmm, interesting. $ git checkout --orphan notyet $ git rev-parse --abbrev-ref HEAD $ git symbolic-ref --

Re: git branch command is incompatible with bash

2015-07-28 Thread Johannes Sixt
Am 27.07.2015 um 23:49 schrieb Junio C Hamano: Johannes Sixt writes: Try branchName=$(git rev-parse --abbrev-ref HEAD) Hmm, interesting. $ git checkout --orphan notyet $ git rev-parse --abbrev-ref HEAD $ git symbolic-ref --short HEAD Please don't scare newcomers with t

Re: git branch command is incompatible with bash

2015-07-27 Thread Junio C Hamano
Johannes Sixt writes: > Try > > branchName=$(git rev-parse --abbrev-ref HEAD) Hmm, interesting. $ git checkout --orphan notyet $ git rev-parse --abbrev-ref HEAD $ git symbolic-ref --short HEAD -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a mess

Re: git branch command is incompatible with bash

2015-07-27 Thread Johannes Sixt
Am 27.07.2015 um 14:12 schrieb Anatol Rudolph: When using the git branch command, git uses a '*' to denote the current branch. Therefore, in bash this: $ branchName=$(git branch -q) $ echo $branchName produces a directory listing, because the '*' is interpreded by the shell. O

git branch command is incompatible with bash

2015-07-27 Thread Anatol Rudolph
Hello! I hope posting this to this mailing list is okay, this is the first ever mail that I submit to a technical mailing list. When using the git branch command, git uses a '*' to denote the current branch. Therefore, in bash this: $ branchName=$(git branch -q) $ echo $branchNa