Skip to content

Commit a4941a8

Browse files
avargitster
authored andcommitted
reset: suggest what to do upon "git reset --mixed <paths>"
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 452c6d5 commit a4941a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎builtin/reset.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
318318
* affecting the working tree nor HEAD. */
319319
if (i < argc) {
320320
if (reset_type == MIXED)
321-
warning("--mixed option is deprecated with paths.");
321+
warning("--mixed with paths is deprecated; use 'git reset -- <paths>' instead.");
322322
else if (reset_type != NONE)
323323
die("Cannot do %s reset with paths.",
324324
reset_type_names[reset_type]);

0 commit comments

Comments
 (0)