mirror of
https://github.com/git-for-windows/git.git
synced 2025-12-15 04:04:52 -06:00
Merge branch 'kd/stash-with-bash-4.4'
bash 4.4 or newer gave a warning on NUL byte in command substitution done in "git stash"; this has been squelched. * kd/stash-with-bash-4.4: stash: prevent warning about null bytes in input
This commit is contained in:
commit
ef9408cfb5
11
git-stash.sh
11
git-stash.sh
@ -43,9 +43,16 @@ no_changes () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
untracked_files () {
|
untracked_files () {
|
||||||
|
if test "$1" = "-z"
|
||||||
|
then
|
||||||
|
shift
|
||||||
|
z=-z
|
||||||
|
else
|
||||||
|
z=
|
||||||
|
fi
|
||||||
excl_opt=--exclude-standard
|
excl_opt=--exclude-standard
|
||||||
test "$untracked" = "all" && excl_opt=
|
test "$untracked" = "all" && excl_opt=
|
||||||
git ls-files -o -z $excl_opt -- "$@"
|
git ls-files -o $z $excl_opt -- "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
clear_stash () {
|
clear_stash () {
|
||||||
@ -114,7 +121,7 @@ create_stash () {
|
|||||||
# Untracked files are stored by themselves in a parentless commit, for
|
# Untracked files are stored by themselves in a parentless commit, for
|
||||||
# ease of unpacking later.
|
# ease of unpacking later.
|
||||||
u_commit=$(
|
u_commit=$(
|
||||||
untracked_files "$@" | (
|
untracked_files -z "$@" | (
|
||||||
GIT_INDEX_FILE="$TMPindex" &&
|
GIT_INDEX_FILE="$TMPindex" &&
|
||||||
export GIT_INDEX_FILE &&
|
export GIT_INDEX_FILE &&
|
||||||
rm -f "$TMPindex" &&
|
rm -f "$TMPindex" &&
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user