From: Junio C Hamano Date: Sun, 10 Sep 2017 08:02:56 +0000 (+0900) Subject: Merge branch 'mf/no-dashed-subcommands' into maint X-Git-Tag: v2.14.2~21 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/036e1274a2e230462ce7b201de760bb12260a516?hp=-c Merge branch 'mf/no-dashed-subcommands' into maint Code clean-up. * mf/no-dashed-subcommands: scripts: use "git foo" not "git-foo" --- 036e1274a2e230462ce7b201de760bb12260a516 diff --combined git-stash.sh index 5f09a47f0a,9aa09c3a33..328cd80d83 --- a/git-stash.sh +++ b/git-stash.sh @@@ -43,16 -43,9 +43,16 @@@ no_changes () } untracked_files () { + if test "$1" = "-z" + then + shift + z=-z + else + z= + fi excl_opt=--exclude-standard test "$untracked" = "all" && excl_opt= - git ls-files -o -z $excl_opt -- "$@" + git ls-files -o $z $excl_opt -- "$@" } clear_stash () { @@@ -121,7 -114,7 +121,7 @@@ create_stash () # Untracked files are stored by themselves in a parentless commit, for # ease of unpacking later. u_commit=$( - untracked_files "$@" | ( + untracked_files -z "$@" | ( GIT_INDEX_FILE="$TMPindex" && export GIT_INDEX_FILE && rm -f "$TMPindex" && @@@ -580,7 -573,7 +580,7 @@@ apply_stash () if test -n "$u_tree" then - GIT_INDEX_FILE="$TMPindex" git-read-tree "$u_tree" && + GIT_INDEX_FILE="$TMPindex" git read-tree "$u_tree" && GIT_INDEX_FILE="$TMPindex" git checkout-index --all && rm -f "$TMPindex" || die "$(gettext "Could not restore untracked files from stash entry")"