X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-stash.sh;h=1d95447d03f342811dd77386f2e83d0814beabf2;hb=0c72cead8435b2865efc884060bd0bd49313cbd5;hp=59db3dc38e72fda88d521171a174c08b919677a9;hpb=f350e1faaa7070030a5c40acdaec650b47dfdc12;p=git.git diff --git a/git-stash.sh b/git-stash.sh index 59db3dc38..1d95447d0 100755 --- a/git-stash.sh +++ b/git-stash.sh @@ -57,7 +57,7 @@ create_stash () { # state of the base commit if b_commit=$(git rev-parse --verify HEAD) then - head=$(git log --no-color --abbrev-commit --pretty=oneline -n 1 HEAD --) + head=$(git rev-list --oneline -n 1 HEAD --) else die "You do not have the initial commit yet" fi @@ -86,7 +86,7 @@ create_stash () { GIT_INDEX_FILE="$TMP-index" && export GIT_INDEX_FILE && git read-tree -m $i_tree && - git add -u && + git diff --name-only -z HEAD | git update-index -z --add --remove --stdin && git write-tree && rm -f "$TMP-index" ) ) ||