add: remove support for git-legacy-stash
In 90a6bb98d11 (legacy stash -p: respect the add.interactive.usebuiltin setting, 2019-12-21), we added support to use the built-in `add -p` from the scripted `stash -p`. In 8a2cd3f5123 (stash: remove the stash.useBuiltin setting, 2020-03-03), we retired the scripted `stash` (including the scripted `stash -p`). Therefore this support is no longer necessary. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
6de07229ac
commit
5d4dc38bfd
@ -32,7 +32,6 @@ static int add_renormalize;
|
|||||||
static int pathspec_file_nul;
|
static int pathspec_file_nul;
|
||||||
static int include_sparse;
|
static int include_sparse;
|
||||||
static const char *pathspec_from_file;
|
static const char *pathspec_from_file;
|
||||||
static int legacy_stash_p; /* support for the scripted `git stash` */
|
|
||||||
|
|
||||||
struct update_callback_data {
|
struct update_callback_data {
|
||||||
int flags;
|
int flags;
|
||||||
@ -388,8 +387,6 @@ static struct option builtin_add_options[] = {
|
|||||||
N_("override the executable bit of the listed files")),
|
N_("override the executable bit of the listed files")),
|
||||||
OPT_HIDDEN_BOOL(0, "warn-embedded-repo", &warn_on_embedded_repo,
|
OPT_HIDDEN_BOOL(0, "warn-embedded-repo", &warn_on_embedded_repo,
|
||||||
N_("warn when adding an embedded repository")),
|
N_("warn when adding an embedded repository")),
|
||||||
OPT_HIDDEN_BOOL(0, "legacy-stash-p", &legacy_stash_p,
|
|
||||||
N_("backend for `git stash -p`")),
|
|
||||||
OPT_PATHSPEC_FROM_FILE(&pathspec_from_file),
|
OPT_PATHSPEC_FROM_FILE(&pathspec_from_file),
|
||||||
OPT_PATHSPEC_FILE_NUL(&pathspec_file_nul),
|
OPT_PATHSPEC_FILE_NUL(&pathspec_file_nul),
|
||||||
OPT_END(),
|
OPT_END(),
|
||||||
@ -512,17 +509,6 @@ int cmd_add(int argc, const char **argv, const char *prefix)
|
|||||||
die(_("options '%s' and '%s' cannot be used together"), "--pathspec-from-file", "--interactive/--patch");
|
die(_("options '%s' and '%s' cannot be used together"), "--pathspec-from-file", "--interactive/--patch");
|
||||||
exit(interactive_add(argv + 1, prefix, patch_interactive));
|
exit(interactive_add(argv + 1, prefix, patch_interactive));
|
||||||
}
|
}
|
||||||
if (legacy_stash_p) {
|
|
||||||
struct pathspec pathspec;
|
|
||||||
|
|
||||||
parse_pathspec(&pathspec, 0,
|
|
||||||
PATHSPEC_PREFER_FULL |
|
|
||||||
PATHSPEC_SYMLINK_LEADING_PATH |
|
|
||||||
PATHSPEC_PREFIX_ORIGIN,
|
|
||||||
prefix, argv);
|
|
||||||
|
|
||||||
return run_add_interactive(NULL, "--patch=stash", &pathspec);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (edit_interactive) {
|
if (edit_interactive) {
|
||||||
if (pathspec_from_file)
|
if (pathspec_from_file)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user