Skip to content

Commit 5bfe373

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]>
1 parent ffeb244 commit 5bfe373

File tree

6 files changed

+463
-71
lines changed

6 files changed

+463
-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
@@ -1117,6 +1117,7 @@ BUILTIN_OBJS += builtin/shortlog.o
11171117
BUILTIN_OBJS += builtin/show-branch.o
11181118
BUILTIN_OBJS += builtin/show-index.o
11191119
BUILTIN_OBJS += builtin/show-ref.o
1120+
BUILTIN_OBJS += builtin/stash--helper.o
11201121
BUILTIN_OBJS += builtin/stripspace.o
11211122
BUILTIN_OBJS += builtin/submodule--helper.o
11221123
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)