Skip to content

Commit 3d5ec65

Browse files
klusarkgitster
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 a145350 commit 3d5ec65

File tree

6 files changed

+465
-71
lines changed

6 files changed

+465
-71
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@
156156
/git-show-ref
157157
/git-stage
158158
/git-stash
159+
/git-stash--helper
159160
/git-status
160161
/git-stripspace
161162
/git-submodule

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,6 +1090,7 @@ BUILTIN_OBJS += builtin/shortlog.o
10901090
BUILTIN_OBJS += builtin/show-branch.o
10911091
BUILTIN_OBJS += builtin/show-index.o
10921092
BUILTIN_OBJS += builtin/show-ref.o
1093+
BUILTIN_OBJS += builtin/stash--helper.o
10931094
BUILTIN_OBJS += builtin/stripspace.o
10941095
BUILTIN_OBJS += builtin/submodule--helper.o
10951096
BUILTIN_OBJS += builtin/symbolic-ref.o

builtin.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ extern int cmd_show(int argc, const char **argv, const char *prefix);
222222
extern int cmd_show_branch(int argc, const char **argv, const char *prefix);
223223
extern int cmd_show_index(int argc, const char **argv, const char *prefix);
224224
extern int cmd_status(int argc, const char **argv, const char *prefix);
225+
extern int cmd_stash__helper(int argc, const char **argv, const char *prefix);
225226
extern int cmd_stripspace(int argc, const char **argv, const char *prefix);
226227
extern int cmd_submodule__helper(int argc, const char **argv, const char *prefix);
227228
extern int cmd_symbolic_ref(int argc, const char **argv, const char *prefix);

0 commit comments

Comments
 (0)