From: Junio C Hamano Date: Tue, 9 Sep 2014 19:54:00 +0000 (-0700) Subject: Merge branch 'jk/stash-list-p' X-Git-Tag: v2.2.0-rc0~165 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/753aaf3aabe698bbc965fdbb66aceb2e5eda2454?ds=inline;hp=-c Merge branch 'jk/stash-list-p' Teach "git stash list -p" to show the difference between the base commit version and the working tree version, which is in line with what "git show" gives. * jk/stash-list-p: stash: default listing to working-tree diff --- 753aaf3aabe698bbc965fdbb66aceb2e5eda2454 diff --combined git-stash.sh index bcc757b390,091c95cac8..9c1ba8e4b8 --- a/git-stash.sh +++ b/git-stash.sh @@@ -13,7 -13,7 +13,7 @@@ USAGE="list [ SUBDIRECTORY_OK=Yes OPTIONS_SPEC= -START_DIR=`pwd` +START_DIR=$(pwd) . git-sh-setup . git-sh-i18n require_work_tree @@@ -94,8 -94,7 +94,8 @@@ create_stash () # ease of unpacking later. u_commit=$( untracked_files | ( - export GIT_INDEX_FILE="$TMPindex" + GIT_INDEX_FILE="$TMPindex" && + export GIT_INDEX_FILE && rm -f "$TMPindex" && git update-index -z --add --remove --stdin && u_tree=$(git write-tree) && @@@ -297,7 -296,7 +297,7 @@@ have_stash () list_stash () { have_stash || return 0 - git log --format="%gd: %gs" -g "$@" $ref_stash -- + git log --format="%gd: %gs" -g --first-parent -m "$@" $ref_stash -- } show_stash () {