git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: "Holst, Henrik" <henrik.holst@frostbite.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: git --merge and option parsing
Date: Tue, 23 May 2017 07:39:30 -0400	[thread overview]
Message-ID: <20170523113930.tqg4te7dfqr3f7s2@sigill.intra.peff.net> (raw)
In-Reply-To: <BLUPR0701MB75463EE0B8ADC559BBE02A282F90@BLUPR0701MB754.namprd07.prod.outlook.com>

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

      reply	other threads:[~2017-05-23 11:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-23 10:17 git --merge and option parsing Holst, Henrik
2017-05-23 11:39 ` Jeff King [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170523113930.tqg4te7dfqr3f7s2@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=henrik.holst@frostbite.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).