From: Thomas Rast Date: Mon, 19 Oct 2009 15:48:11 +0000 (+0200) Subject: stash list: use new %g formats instead of sed X-Git-Tag: v1.6.6-rc0~76^2~1 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=391c53bdcd7bbce366eaef7288afb948525ed3e8;p=git.git stash list: use new %g formats instead of sed With the new formats, we can rewrite 'git stash list' in terms of an appropriate pretty format, instead of hand-editing with sed. This has the advantage that it obeys the normal settings for git-log, notably the pager. Signed-off-by: Thomas Rast Signed-off-by: Junio C Hamano --- diff --git a/git-stash.sh b/git-stash.sh index 4febbbfa5..f8847c1fc 100755 --- a/git-stash.sh +++ b/git-stash.sh @@ -205,8 +205,7 @@ have_stash () { list_stash () { have_stash || return 0 - git log --no-color --pretty=oneline -g "$@" $ref_stash -- | - sed -n -e 's/^[.0-9a-f]* refs\///p' + git log --format="%gd: %gs" -g "$@" $ref_stash -- } show_stash () {