* git --merge and option parsing
@ 2017-05-23 10:17 Holst, Henrik
2017-05-23 11:39 ` Jeff King
0 siblings, 1 reply; 2+ messages in thread
From: Holst, Henrik @ 2017-05-23 10:17 UTC (permalink / raw)
To: git@vger.kernel.org; +Cc: Holst, Henrik
Hi,
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.
hholst@fb-hholst3 ~/src/a3c-batch (feature/NetworkHandler) [conda:tensorflow]
$ git branch --no-column --merged
* feature/NetworkHandler
[snip]
hholst@fb-hholst3 ~/src/a3c-batch (feature/NetworkHandler) [conda:tensorflow]
$ git branch --merged --no-column
fatal: malformed object name --no-column
hholst@fb-hholst3 ~/src/a3c-batch (feature/NetworkHandler) [conda:tensorflow]
$ git --version
git version 2.13.0
Best,
Henrik Holst
(Not on the list)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: git --merge and option parsing
2017-05-23 10:17 git --merge and option parsing Holst, Henrik
@ 2017-05-23 11:39 ` Jeff King
0 siblings, 0 replies; 2+ messages in thread
From: Jeff King @ 2017-05-23 11:39 UTC (permalink / raw)
To: Holst, Henrik; +Cc: git@vger.kernel.org
On Tue, May 23, 2017 at 10:17:18AM +0000, Holst, Henrik wrote:
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-05-23 11:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-23 10:17 git --merge and option parsing Holst, Henrik
2017-05-23 11:39 ` Jeff King
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).