git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] reset: Better warning message on git reset --mixed <paths>

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Aug 14, 2010, 21:05 UTC
Message-ID
<20100814210505.GA2372@burratino>
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> --”.

Show 7 quoted lines
> +++ 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
Previous: Ævar Arnfjörð BjarmasonNext: Junio C Hamano
Message 2 of 18 in “reset: Better warning message on git reset --mixed <paths>”
  1. reset: Better warning message on git reset --mixed <paths>Ævar Arnfjörð Bjarmason, Aug 14, 2010
  2. Jonathan NiederAug 14, 2010
  3. Junio C HamanoAug 15, 2010
  4. Miles BaderAug 15, 2010
  5. Ævar Arnfjörð BjarmasonAug 15, 2010
  6. Junio C HamanoAug 15, 2010
  7. Jonathan NiederAug 15, 2010
  8. Junio C HamanoAug 15, 2010
  9. Ævar Arnfjörð BjarmasonAug 15, 2010
  10. Junio C HamanoAug 15, 2010
  11. Miles BaderAug 16, 2010
  12. Ævar Arnfjörð BjarmasonAug 16, 2010
  13. Ralf EbertAug 15, 2010
  14. Jonathan NiederAug 16, 2010
  15. David FriesAug 15, 2010
  16. reset: Better warning message on git reset --mixed <paths>Ævar Arnfjörð Bjarmason, Aug 15, 2010
  17. Junio C HamanoAug 16, 2010
  18. Ævar Arnfjörð BjarmasonAug 16, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.