summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f70f736)
raw | patch | inline | side by side (parent: f70f736)
author | Johannes Sixt <j6t@kdbg.org> | |
Tue, 1 Mar 2011 13:21:05 +0000 (14:21 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 2 Mar 2011 20:26:18 +0000 (12:26 -0800) |
rerere forget is a destructive command. When invoked without a path, it
operates on the current directory, potentially deleting many recorded
conflict resolutions.
To make the command safer, a path must be specified as of git 1.8.0. Until
then, give users time to write 'git rerere forget .' if they really mean
the entire current directory.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
operates on the current directory, potentially deleting many recorded
conflict resolutions.
To make the command safer, a path must be specified as of git 1.8.0. Until
then, give users time to write 'git rerere forget .' if they really mean
the entire current directory.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-rerere.txt | patch | blob | history | |
builtin/rerere.c | patch | blob | history |
index db99d4786e06df1cd2c9352c877c45efcbfb10cc..484fdd5be7901a45d94dd4362c91339ed0753995 100644 (file)
SYNOPSIS
--------
-'git rerere' ['clear'|'forget' [<pathspec>]|'diff'|'status'|'gc']
+'git rerere' ['clear'|'forget' <pathspec>|'diff'|'status'|'gc']
DESCRIPTION
-----------
'forget' <pathspec>::
This resets the conflict resolutions which rerere has recorded for the current
-conflict in <pathspec>. The <pathspec> is optional.
+conflict in <pathspec>.
'diff'::
diff --git a/builtin/rerere.c b/builtin/rerere.c
index 67cbfeb152386a1c918a103a2073d83138bfdff0..82358855d1da90b75f94c3d424a5da5c0f97960e 100644 (file)
--- a/builtin/rerere.c
+++ b/builtin/rerere.c
#include "xdiff-interface.h"
static const char * const rerere_usage[] = {
- "git rerere [clear | status | remaining | diff | gc]",
+ "git rerere [clear | forget path... | status | remaining | diff | gc]",
NULL,
};
return rerere(flags);
if (!strcmp(argv[0], "forget")) {
- const char **pathspec = get_pathspec(prefix, argv + 1);
+ const char **pathspec;
+ if (argc < 2)
+ warning("'git rerere forget' without paths is deprecated");
+ pathspec = get_pathspec(prefix, argv + 1);
return rerere_forget(pathspec);
}