Re: git --merge and option parsing
- From
Jeff King <peff@peff.net>
- Date
- May 23, 2017, 11:39 UTC
- Message-ID
- <20170523113930.tqg4te7dfqr3f7s2@sigill.intra.peff.net>
- In-Reply-To
- <BLUPR0701MB75463EE0B8ADC559BBE02A282F90@BLUPR0701MB754.namprd07.prod.outlook.com>
On Tue, May 23, 2017 at 10:17:18AM +0000, Holst, Henrik wrote:
Show 8 quoted lines
> I am not sure if this is a bug but it was surprising to me so I > thought I'd report it here. > > I added `ui.column=auto` to my gitconfig and that does not work so > well with pipes so I want to use `--no-column` option. I was a bit > surprised that this does not work? It seems that `--merged` picks up > `--no-column` as a commit reference instead it being parsed as an > option.
That's behaving as expected. The --merged option has an optional argument, which defaults to "HEAD". If you provide another argument (even if it looks like an option to you), then it gets attached to --merged.
As you saw, "git branch --no-column --merged" works, but so would "git branch --merged HEAD --no-column".
-Peff