summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Rast <trast@student.ethz.ch>2009-10-19 17:48:11 +0200
committerJunio C Hamano <gitster@pobox.com>2009-10-19 22:28:26 -0700
commit391c53bdcd7bbce366eaef7288afb948525ed3e8 (patch)
tree9d5667eb59405bdc0fda5b1dcc0eff7046d615df
parent8f8f5476cd6542387d435c242752404cf144005f (diff)
downloadgit-391c53bdcd7bbce366eaef7288afb948525ed3e8.tar.gz
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>
-rwxr-xr-xgit-stash.sh3
1 files changed, 1 insertions, 2 deletions
diff --git a/git-stash.sh b/git-stash.sh
index 4febbbfa5d..f8847c1fc0 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 () {