git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com>
To: Junio C Hamano <gitster@pobox.com>, Jonathan Nieder <jrnieder@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH/RFC] setup: update error message to be more meaningful
Date: Sat, 29 Jul 2017 08:14:30 +0530	[thread overview]
Message-ID: <1501296270.2112.2.camel@gmail.com> (raw)
In-Reply-To: <xmqqlgnbq7sc.fsf@gitster.mtv.corp.google.com>

On Wed, 2017-07-26 at 13:09 -0700, Junio C Hamano wrote:
> Jonathan Nieder <jrnieder@gmail.com> writes:
> 
> > For an initial guess: in the example
> > 
> > 	git grep test -n
> > 
> > ...
> >  2. Focus on "argument" instead of "filename" so that the message
> >     could still apply: something like
> > 
> > 	fatal: option '-n' must come before non-option arguments
> 
> I think this one is the most sensible.  There may or may not be a
> file called "test" in the working tree, and the user may or may not
> meant to look for a pattern "test".  What is wrong in the sample
> command line is that "test" is not a dashed option and yet it has a
> dashed option "-n" after it, and your version clearly explains it.
Though the message seems to be most fitting one, I'm a little reluctant
to use it as it "might" create a wrong picture on the minds of the user
making them think this would be the case in other cases too, which we
know is not true. For example,


    git log -p --full-diff master --stat

    git commit -v Makefile --amend


The above are valid commands and produce expected result even though
the 'option argument' comes after the 'non-option' argument. Thus, I
thought a "general statement" like the one above might create a wrong
picture on the minds of user. Any thoughts about how to overcome this?

-- 
Kaartic

  reply	other threads:[~2017-07-29  2:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-25 17:57 [PATCH/RFC] setup: update error message to be more meaningful Kaartic Sivaraam
2017-07-25 18:16 ` Kaartic Sivaraam
2017-07-25 21:21 ` Jonathan Nieder
2017-07-26 13:08   ` Kaartic Sivaraam
2017-07-26 20:09   ` Junio C Hamano
2017-07-29  2:44     ` Kaartic Sivaraam [this message]
2017-07-29  3:53       ` Junio C Hamano
2017-07-29 12:13         ` Kaartic Sivaraam
2017-07-29 12:41           ` [PATCH] " Kaartic Sivaraam
2017-07-29 16:10           ` [PATCH/RFC] " Junio C Hamano
2017-07-30 10:47             ` Kaartic Sivaraam
2017-07-30 11:03               ` Kaartic Sivaraam
2017-10-02 17:30     ` [PATCH v2] " Kaartic Sivaraam
2017-10-03  0:32       ` Junio C Hamano
2017-10-04 14:18         ` Kaartic Sivaraam

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

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

  git send-email \
    --in-reply-to=1501296270.2112.2.camel@gmail.com \
    --to=kaarticsivaraam91196@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@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.
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 NNTP newsgroup(s).