Skip to content

Commit 5d4dc38

Browse files
dschogitster
authored andcommitted
add: remove support for git-legacy-stash
In 90a6bb9 (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 8a2cd3f (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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6de0722 commit 5d4dc38

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

builtin/add.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ static int add_renormalize;
3232
static int pathspec_file_nul;
3333
static int include_sparse;
3434
static const char *pathspec_from_file;
35-
static int legacy_stash_p; /* support for the scripted `git stash` */
3635

3736
struct update_callback_data {
3837
int flags;
@@ -388,8 +387,6 @@ static struct option builtin_add_options[] = {
388387
N_("override the executable bit of the listed files")),
389388
OPT_HIDDEN_BOOL(0, "warn-embedded-repo", &warn_on_embedded_repo,
390389
N_("warn when adding an embedded repository")),
391-
OPT_HIDDEN_BOOL(0, "legacy-stash-p", &legacy_stash_p,
392-
N_("backend for `git stash -p`")),
393390
OPT_PATHSPEC_FROM_FILE(&pathspec_from_file),
394391
OPT_PATHSPEC_FILE_NUL(&pathspec_file_nul),
395392
OPT_END(),
@@ -512,17 +509,6 @@ int cmd_add(int argc, const char **argv, const char *prefix)
512509
die(_("options '%s' and '%s' cannot be used together"), "--pathspec-from-file", "--interactive/--patch");
513510
exit(interactive_add(argv + 1, prefix, patch_interactive));
514511
}
515-
if (legacy_stash_p) {
516-
struct pathspec pathspec;
517-
518-
parse_pathspec(&pathspec, 0,
519-
PATHSPEC_PREFER_FULL |
520-
PATHSPEC_SYMLINK_LEADING_PATH |
521-
PATHSPEC_PREFIX_ORIGIN,
522-
prefix, argv);
523-
524-
return run_add_interactive(NULL, "--patch=stash", &pathspec);
525-
}
526512

527513
if (edit_interactive) {
528514
if (pathspec_from_file)

0 commit comments

Comments
 (0)