summaryrefslogtreecommitdiff
path: root/git.c
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2019-02-25 23:16:30 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-03-07 00:41:40 (GMT)
commit90a462725ef3932a2408e78a47e3dfc1b8d445cf (patch)
treea6126954c52363bc9eaefebd5fc1f1a425abfe40 /git.c
parent8d8e9c2a94c4cb60a0db2a496fd1f28fc6ec79f8 (diff)
downloadgit-90a462725ef3932a2408e78a47e3dfc1b8d445cf.zip
git-90a462725ef3932a2408e78a47e3dfc1b8d445cf.tar.gz
git-90a462725ef3932a2408e78a47e3dfc1b8d445cf.tar.bz2
stash: optionally use the scripted version again
We recently converted the `git stash` command from Unix shell scripts to builtins. Let's end users a way out when they discover a bug in the builtin command: `stash.useBuiltin`. As the file name `git-stash` is already in use, let's rename the scripted backend to `git-legacy-stash`. To make the test suite pass with `stash.useBuiltin=false`, this commit also backports rudimentary support for `-q` (but only *just* enough to appease the test suite), and adds a super-ugly hack to force exit code 129 for `git stash -h`. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git.c')
-rw-r--r--git.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/git.c b/git.c
index 49ab91b..8de729c 100644
--- a/git.c
+++ b/git.c
@@ -554,7 +554,12 @@ static struct cmd_struct commands[] = {
{ "show-index", cmd_show_index },
{ "show-ref", cmd_show_ref, RUN_SETUP },
{ "stage", cmd_add, RUN_SETUP | NEED_WORK_TREE },
- { "stash", cmd_stash, RUN_SETUP | NEED_WORK_TREE },
+ /*
+ * NEEDSWORK: Until the builtin stash is thoroughly robust and no
+ * longer needs redirection to the stash shell script this is kept as
+ * is, then should be changed to RUN_SETUP | NEED_WORK_TREE
+ */
+ { "stash", cmd_stash },
{ "status", cmd_status, RUN_SETUP | NEED_WORK_TREE },
{ "stripspace", cmd_stripspace },
{ "submodule--helper", cmd_submodule__helper, RUN_SETUP | SUPPORT_SUPER_PREFIX | NO_PARSEOPT },