From: "Carlo Marcelo Arenas Belón" <carenas@gmail.com>
To: git@vger.kernel.org
Cc: Johannes.Schindelin@gmx.de,
"Carlo Marcelo Arenas Belón" <carenas@gmail.com>
Subject: [PATCH 1/2] builtin/add: remove obsoleted support for legacy stash -p
Date: Mon, 16 Aug 2021 23:44:34 -0700 [thread overview]
Message-ID: <20210817064435.97625-2-carenas@gmail.com> (raw)
In-Reply-To: <20210817064435.97625-1-carenas@gmail.com>
90a6bb98d1 (legacy stash -p: respect the add.interactive.usebuiltin
setting, 2019-12-21) adds a hidden option and its supporting code
to support the legacy stash script, but that was left behind when
it was retired.
mostly revert commit.
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
---
builtin/add.c | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/builtin/add.c b/builtin/add.c
index b773b5a499..a15b5be220 100644
--- a/builtin/add.c
+++ b/builtin/add.c
@@ -31,7 +31,6 @@ static int take_worktree_changes;
static int add_renormalize;
static int pathspec_file_nul;
static const char *pathspec_from_file;
-static int legacy_stash_p; /* support for the scripted `git stash` */
struct update_callback_data {
int flags;
@@ -382,8 +381,6 @@ static struct option builtin_add_options[] = {
N_("override the executable bit of the listed files")),
OPT_HIDDEN_BOOL(0, "warn-embedded-repo", &warn_on_embedded_repo,
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_FILE_NUL(&pathspec_file_nul),
OPT_END(),
@@ -483,6 +480,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)
builtin_add_usage, PARSE_OPT_KEEP_ARGV0);
if (patch_interactive)
add_interactive = 1;
+
if (add_interactive) {
if (show_only)
die(_("--dry-run is incompatible with --interactive/--patch"));
@@ -490,17 +488,6 @@ int cmd_add(int argc, const char **argv, const char *prefix)
die(_("--pathspec-from-file is incompatible with --interactive/--patch"));
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 (pathspec_from_file)
--
2.33.0.476.gf000ecbed9
next prev parent reply other threads:[~2021-08-17 6:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-17 6:44 [PATCH 0/2] builtin/add: minor unrelated fixes Carlo Marcelo Arenas Belón
2021-08-17 6:44 ` Carlo Marcelo Arenas Belón [this message]
2021-08-31 0:33 ` [PATCH 1/2] builtin/add: remove obsoleted support for legacy stash -p Taylor Blau
2021-08-17 6:44 ` [PATCH 2/2] builtin/add: make clear edit and patch/interactive are incompatible Carlo Marcelo Arenas Belón
2021-08-17 10:05 ` Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210817064435.97625-2-carenas@gmail.com \
--to=carenas@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).