git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Christian Couder <christian.couder@gmail.com>
Cc: Jacob Keller <jacob.keller@gmail.com>,
	Git mailing list <git@vger.kernel.org>
Subject: Re: git commit file completion recently broke
Date: Thu, 7 Dec 2017 03:19:10 -0500	[thread overview]
Message-ID: <20171207081910.GA29464@sigill.intra.peff.net> (raw)
In-Reply-To: <CAP8UFD3iL_sRgvhm7YO_jVG5RiNn1=JRW0qvhBEPcUtCorWdYA@mail.gmail.com>

On Thu, Dec 07, 2017 at 09:14:31AM +0100, Christian Couder wrote:

> > I do think it may make sense for
> > the "short" one to use NULL, like:
> >
> >   skip_to_optional_val(arg, "--relative, &arg)
> >
> > but maybe some other callers would be more inconvenienced (they may have
> > to current NULL back into the empty string if they want to string
> > "--foo" the same as "--foo=").

Oof, I lost all ability to type in that last sentence. :)

It looks like you deciphered my meaning, though.

> I discussed that with Junio and yeah there are many callers that want
> "--foo" to be the same as "--foo=".

Yeah, if this is the only case, then just calling the "_default" variant
with NULL for this instance makes sense to me.

> By the way I wonder if "--relative=" makes any sense, and if we should
> emit a warning or just die in this case.

I also wondered about that. It does function as "relative to the root of
the tree". But of course if you want that you can just omit
"--relative". Still, it could be a minor convenience for somebody who is
filling in "--relative" in a script. That's reaching, I think, but I
don't see any particular reason to _forbid_ it (especially since it has
worked for many years).

-Peff

  reply	other threads:[~2017-12-07  8:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-06 23:53 git commit file completion recently broke Jacob Keller
2017-12-07  0:01 ` Jacob Keller
2017-12-07  0:08   ` Jacob Keller
2017-12-07  0:22   ` Jeff King
2017-12-07  0:24     ` Jeff King
2017-12-07  0:38       ` Jacob Keller
2017-12-07  0:56         ` Jeff King
2017-12-07  1:04           ` Jacob Keller
2017-12-07  1:08             ` Jeff King
2017-12-07  8:14           ` Christian Couder
2017-12-07  8:19             ` Jeff King [this message]
2017-12-07 15:24             ` Junio C Hamano
2017-12-07 18:57               ` Jacob Keller

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=20171207081910.GA29464@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jacob.keller@gmail.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).