Merge branch 'mf/no-dashed-subcommands' into maint
authorJunio C Hamano <gitster@pobox.com>
Sun, 10 Sep 2017 08:02:56 +0000 (17:02 +0900)
committerJunio C Hamano <gitster@pobox.com>
Sun, 10 Sep 2017 08:02:56 +0000 (17:02 +0900)
Code clean-up.

* mf/no-dashed-subcommands:
scripts: use "git foo" not "git-foo"

1  2 
git-stash.sh
diff --combined git-stash.sh
index 5f09a47f0aa9abd85f1d4ed5a5892d23d0230aba,9aa09c3a33e5986d534be4c5a4209d234dfa4506..328cd80d83a03a674e0541bddb6bce0532c682b7
@@@ -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")"