Skip to content

Commit

Permalink
reset: suggest what to do upon "git reset --mixed <paths>"
Browse files Browse the repository at this point in the history
When you call "git reset --mixed <paths>" git will warn that using mixed
with paths is deprecated:

    warning: --mixed option is deprecated with paths.

That doesn't tell the user what he should use instead. Expand on the
warning and tell the user to just omit --mixed:

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

The exact wording of the warning was suggested by Jonathan Nieder.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Ævar Arnfjörð Bjarmason authored and Junio C Hamano committed Aug 22, 2010
1 parent 452c6d5 commit a4941a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin/reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 with paths is deprecated; use 'git reset -- <paths>' instead.");
else if (reset_type != NONE)
die("Cannot do %s reset with paths.",
reset_type_names[reset_type]);
Expand Down

0 comments on commit a4941a8

Please sign in to comment.