Skip to content

Commit f1461ae

Browse files
committed
Merge branch 'ps/stash-in-c' into jch
"git stash" rewritten in C. * ps/stash-in-c: (28 commits) strbuf_vinsertf: provide the correct buffer size to vsnprintf stash: fix segmentation fault when files were added with intent tests: add a special setup where stash.useBuiltin is off stash: optionally use the scripted version again stash: add back the original, scripted `git stash` stash: convert `stash--helper.c` into `stash.c` stash: replace all `write-tree` child processes with API calls stash: optimize `get_untracked_files()` and `check_changes()` stash: convert save to builtin stash: make push -q quiet stash: convert push to builtin stash: convert create to builtin stash: convert store to builtin stash: convert show to builtin stash: convert list to builtin stash: convert pop to builtin stash: convert branch to builtin stash: convert drop and clear to builtin stash: convert apply to builtin stash: mention options in `show` synopsis ...
2 parents d21f305 + 8187099 commit f1461ae

16 files changed

+2012
-72
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
/git-interpret-trailers
8484
/git-instaweb
8585
/git-legacy-rebase
86+
/git-legacy-stash
8687
/git-log
8788
/git-ls-files
8889
/git-ls-remote

Documentation/git-stash.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ SYNOPSIS
99
--------
1010
[verse]
1111
'git stash' list [<options>]
12-
'git stash' show [<stash>]
12+
'git stash' show [<options>] [<stash>]
1313
'git stash' drop [-q|--quiet] [<stash>]
1414
'git stash' ( pop | apply ) [--index] [-q|--quiet] [<stash>]
1515
'git stash' branch <branchname> [<stash>]
@@ -106,7 +106,7 @@ stash@{1}: On master: 9cc0589... Add git-stash
106106
The command takes options applicable to the 'git log'
107107
command to control what is shown and how. See linkgit:git-log[1].
108108

109-
show [<stash>]::
109+
show [<options>] [<stash>]::
110110

111111
Show the changes recorded in the stash entry as a diff between the
112112
stashed contents and the commit back when the stash entry was first

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,9 +627,9 @@ SCRIPT_SH += git-merge-resolve.sh
627627
SCRIPT_SH += git-mergetool.sh
628628
SCRIPT_SH += git-quiltimport.sh
629629
SCRIPT_SH += git-legacy-rebase.sh
630+
SCRIPT_SH += git-legacy-stash.sh
630631
SCRIPT_SH += git-remote-testgit.sh
631632
SCRIPT_SH += git-request-pull.sh
632-
SCRIPT_SH += git-stash.sh
633633
SCRIPT_SH += git-submodule.sh
634634
SCRIPT_SH += git-web--browse.sh
635635

@@ -1131,6 +1131,7 @@ BUILTIN_OBJS += builtin/shortlog.o
11311131
BUILTIN_OBJS += builtin/show-branch.o
11321132
BUILTIN_OBJS += builtin/show-index.o
11331133
BUILTIN_OBJS += builtin/show-ref.o
1134+
BUILTIN_OBJS += builtin/stash.o
11341135
BUILTIN_OBJS += builtin/stripspace.o
11351136
BUILTIN_OBJS += builtin/submodule--helper.o
11361137
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(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)