@matheusbsbs / matheus-bagliano / commits / a4941a81c8
Fork 0

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 <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Aug 15, 2010 at 08:43 UTC a4941a81c8a67abad2000b044ecad71ceff9d695
1 file changed +1 -1
builtin/reset.c
+1 -1
@@ -318,7 +318,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
318 * affecting the working tree nor HEAD. */
319 if (i < argc) {
320 if (reset_type == MIXED)
321 - warning("--mixed option is deprecated with paths.");
321 + warning("--mixed with paths is deprecated; use 'git reset -- <paths>' instead.");
322 else if (reset_type != NONE)
323 die("Cannot do %s reset with paths.",
324 reset_type_names[reset_type]);