Skip to content

built-in stash: fix segmentation fault when files were added with intent #110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 27 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
4e763fa
sha1-name.c: add `get_oidf()` which acts like `get_oid()`
ungps Dec 20, 2018
0c1599c
strbuf.c: add `strbuf_join_argv()`
ungps Dec 20, 2018
bfc3fe3
strbuf.c: add `strbuf_insertf()` and `strbuf_vinsertf()`
ungps Dec 20, 2018
97f5607
ident: add the ability to provide a "fallback identity"
dscho Dec 20, 2018
0654fe7
stash: improve option parsing test coverage
klusark Dec 20, 2018
caf7bc3
t3903: modernize style
ungps Dec 20, 2018
ee77c6a
stash: rename test cases to be more descriptive
ungps Dec 20, 2018
cb2152e
stash: add tests for `git stash show` config
ungps Dec 20, 2018
983084d
stash: mention options in `show` synopsis
ungps Dec 20, 2018
f6bbd78
stash: convert apply to builtin
klusark Dec 20, 2018
cdca49b
stash: convert drop and clear to builtin
klusark Dec 20, 2018
f596f33
stash: convert branch to builtin
klusark Dec 20, 2018
e1d0187
stash: convert pop to builtin
klusark Dec 20, 2018
9b77b07
stash: convert list to builtin
ungps Dec 20, 2018
b4493f2
stash: convert show to builtin
ungps Dec 20, 2018
847eb0b
stash: convert store to builtin
ungps Dec 20, 2018
1f5a011
stash: convert create to builtin
ungps Dec 20, 2018
fa38428
stash: convert push to builtin
ungps Dec 20, 2018
9a95010
stash: make push -q quiet
ungps Dec 20, 2018
cf5b27d
stash: convert save to builtin
ungps Dec 20, 2018
168e6cf
stash: optimize `get_untracked_files()` and `check_changes()`
ungps Dec 20, 2018
559edea
stash: replace all `write-tree` child processes with API calls
ungps Dec 20, 2018
51809c7
stash: convert `stash--helper.c` into `stash.c`
ungps Dec 20, 2018
c907fe1
stash: add back the original, scripted `git stash`
dscho Dec 20, 2018
26799a2
stash: optionally use the scripted version again
dscho Dec 20, 2018
bec65d5
tests: add a special setup where stash.useBuiltin is off
dscho Dec 20, 2018
b5bbc77
stash: fix segmentation fault when files were added with intent
kraai Jan 4, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
/git-interpret-trailers
/git-instaweb
/git-legacy-rebase
/git-legacy-stash
/git-log
/git-ls-files
/git-ls-remote
Expand Down
4 changes: 2 additions & 2 deletions Documentation/git-stash.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ SYNOPSIS
--------
[verse]
'git stash' list [<options>]
'git stash' show [<stash>]
'git stash' show [<options>] [<stash>]
'git stash' drop [-q|--quiet] [<stash>]
'git stash' ( pop | apply ) [--index] [-q|--quiet] [<stash>]
'git stash' branch <branchname> [<stash>]
Expand Down Expand Up @@ -106,7 +106,7 @@ stash@{1}: On master: 9cc0589... Add git-stash
The command takes options applicable to the 'git log'
command to control what is shown and how. See linkgit:git-log[1].

show [<stash>]::
show [<options>] [<stash>]::

Show the changes recorded in the stash entry as a diff between the
stashed contents and the commit back when the stash entry was first
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -617,9 +617,9 @@ SCRIPT_SH += git-merge-resolve.sh
SCRIPT_SH += git-mergetool.sh
SCRIPT_SH += git-quiltimport.sh
SCRIPT_SH += git-legacy-rebase.sh
SCRIPT_SH += git-legacy-stash.sh
SCRIPT_SH += git-remote-testgit.sh
SCRIPT_SH += git-request-pull.sh
SCRIPT_SH += git-stash.sh
SCRIPT_SH += git-submodule.sh
SCRIPT_SH += git-web--browse.sh

Expand Down Expand Up @@ -1117,6 +1117,7 @@ BUILTIN_OBJS += builtin/shortlog.o
BUILTIN_OBJS += builtin/show-branch.o
BUILTIN_OBJS += builtin/show-index.o
BUILTIN_OBJS += builtin/show-ref.o
BUILTIN_OBJS += builtin/stash.o
BUILTIN_OBJS += builtin/stripspace.o
BUILTIN_OBJS += builtin/submodule--helper.o
BUILTIN_OBJS += builtin/symbolic-ref.o
Expand Down
1 change: 1 addition & 0 deletions builtin.h
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ extern int cmd_show(int argc, const char **argv, const char *prefix);
extern int cmd_show_branch(int argc, const char **argv, const char *prefix);
extern int cmd_show_index(int argc, const char **argv, const char *prefix);
extern int cmd_status(int argc, const char **argv, const char *prefix);
extern int cmd_stash(int argc, const char **argv, const char *prefix);
extern int cmd_stripspace(int argc, const char **argv, const char *prefix);
extern int cmd_submodule__helper(int argc, const char **argv, const char *prefix);
extern int cmd_symbolic_ref(int argc, const char **argv, const char *prefix);
Expand Down
Loading