Skip to content

Commit 45c1389

Browse files
klusarkdscho
authored andcommitted
stash: convert apply to builtin
Add a builtin helper for performing stash commands. Converting all at once proved hard to review, so starting with just apply lets conversion get started without the other commands being finished. The helper is being implemented as a drop in replacement for stash so that when it is complete it can simply be renamed and the shell script deleted. Delete the contents of the apply_stash shell function and replace it with a call to stash--helper apply until pop is also converted. Signed-off-by: Joel Teichroeb <[email protected]> Signed-off-by: Paul-Sebastian Ungureanu <[email protected]> Signed-off-by: Junio C Hamano <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
1 parent e562b6d commit 45c1389

File tree

6 files changed

+464
-71
lines changed

6 files changed

+464
-71
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@
162162
/git-show-ref
163163
/git-stage
164164
/git-stash
165+
/git-stash--helper
165166
/git-status
166167
/git-stripspace
167168
/git-submodule

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,6 +1138,7 @@ BUILTIN_OBJS += builtin/shortlog.o
11381138
BUILTIN_OBJS += builtin/show-branch.o
11391139
BUILTIN_OBJS += builtin/show-index.o
11401140
BUILTIN_OBJS += builtin/show-ref.o
1141+
BUILTIN_OBJS += builtin/stash--helper.o
11411142
BUILTIN_OBJS += builtin/stripspace.o
11421143
BUILTIN_OBJS += builtin/submodule--helper.o
11431144
BUILTIN_OBJS += builtin/symbolic-ref.o

builtin.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ extern int cmd_show(int argc, const char **argv, const char *prefix);
225225
extern int cmd_show_branch(int argc, const char **argv, const char *prefix);
226226
extern int cmd_show_index(int argc, const char **argv, const char *prefix);
227227
extern int cmd_status(int argc, const char **argv, const char *prefix);
228+
extern int cmd_stash__helper(int argc, const char **argv, const char *prefix);
228229
extern int cmd_stripspace(int argc, const char **argv, const char *prefix);
229230
extern int cmd_submodule__helper(int argc, const char **argv, const char *prefix);
230231
extern int cmd_symbolic_ref(int argc, const char **argv, const char *prefix);

0 commit comments

Comments
 (0)