Skip to content

Commit 391c53b

Browse files
trastgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8f8f547 commit 391c53b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

git-stash.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,7 @@ have_stash () {
205205

206206
list_stash () {
207207
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 --
210209
}
211210

212211
show_stash () {

0 commit comments

Comments
 (0)