git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
	Ralf Ebert <info@ralfebert.de>
Subject: Re: [PATCH] reset: Better warning message on git reset --mixed <paths>
Date: Sat, 14 Aug 2010 16:05:06 -0500	[thread overview]
Message-ID: <20100814210505.GA2372@burratino> (raw)
In-Reply-To: <1281814499-11797-1-git-send-email-avarab@gmail.com>

Ævar Arnfjörð Bjarmason wrote:

> Anyway, I think the warning could be better, here's a patch to
> implement that. We could also warn on a plain "git reset --mixed"
> since it's also redundant, but that would be adding something new so I
> haven't done that here.

That seems backwards --- it is not actually the redundancy that leads
to this warning (and I hope we never add such a warning to save people
typing).

Instead, I had assumed the idea was that some day “git reset --mixed
<path>” will be forbidden, eliminating a potential ambiguity in that
argument and saving high-level scripts from needing -- at the end of
“git reset --mixed <rev> --”.

> +++ b/builtin/reset.c
> @@ -318,7 +318,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
>  	 * affecting the working tree nor HEAD. */
>  	if (i < argc) {
>  		if (reset_type == MIXED)
> -			warning("--mixed option is deprecated with paths.");
> +			warning("--mixed is redundant with paths, use 'git reset <paths>' instead.");

Maybe:

 warning: --mixed with paths is deprecated; use 'git reset -- <paths>' instead

  reply	other threads:[~2010-08-14 21:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-14 19:34 [PATCH] reset: Better warning message on git reset --mixed <paths> Ævar Arnfjörð Bjarmason
2010-08-14 21:05 ` Jonathan Nieder [this message]
2010-08-15  1:47   ` Junio C Hamano
2010-08-15  2:43     ` Miles Bader
2010-08-15  8:38       ` Ævar Arnfjörð Bjarmason
2010-08-15 18:36         ` Junio C Hamano
2010-08-15 19:49           ` Jonathan Nieder
2010-08-15 22:18             ` Junio C Hamano
2010-08-15 20:51           ` Ævar Arnfjörð Bjarmason
2010-08-15 22:22             ` Junio C Hamano
2010-08-16  0:59             ` Miles Bader
2010-08-16  1:13               ` Ævar Arnfjörð Bjarmason
2010-08-15 21:05           ` Ralf Ebert
2010-08-16  0:12             ` Jonathan Nieder
2010-08-15 13:02       ` David Fries
2010-08-15  8:43   ` [PATCH v2] " Ævar Arnfjörð Bjarmason
2010-08-16  3:39     ` Junio C Hamano
2010-08-16  4:23       ` Ævar Arnfjörð Bjarmason

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=20100814210505.GA2372@burratino \
    --to=jrnieder@gmail.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=info@ralfebert.de \
    /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).