summaryrefslogtreecommitdiff
path: root/git-stash.sh
diff options
context:
space:
mode:
authorThomas Rast <trast@student.ethz.ch>2009-10-19 15:48:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-10-20 05:28:26 (GMT)
commit391c53bdcd7bbce366eaef7288afb948525ed3e8 (patch)
tree9d5667eb59405bdc0fda5b1dcc0eff7046d615df /git-stash.sh
parent8f8f5476cd6542387d435c242752404cf144005f (diff)
downloadgit-391c53bdcd7bbce366eaef7288afb948525ed3e8.zip
git-391c53bdcd7bbce366eaef7288afb948525ed3e8.tar.gz
git-391c53bdcd7bbce366eaef7288afb948525ed3e8.tar.bz2
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>
Diffstat (limited to 'git-stash.sh')
-rwxr-xr-xgit-stash.sh3
1 files changed, 1 insertions, 2 deletions
diff --git a/git-stash.sh b/git-stash.sh
index 4febbbf..f8847c1 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 () {