@matheusbsbs / matheus-bagliano / commits / 391c53bdcd
Fork 0

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 <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Thomas Rast committed Oct 19, 2009 at 17:48 UTC 391c53bdcd7bbce366eaef7288afb948525ed3e8
1 file changed +1 -2
git-stash.sh
+1 -2
@@ -205,8 +205,7 @@ have_stash () {
205
206 list_stash () {
207 have_stash || return 0
208 - git log --no-color --pretty=oneline -g "$@" $ref_stash -- |
209 - sed -n -e 's/^[.0-9a-f]* refs\///p'
208 + git log --format="%gd: %gs" -g "$@" $ref_stash --
209 }
210
211 show_stash () {