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>
This commit is contained in:
parent
8f8f5476cd
commit
391c53bdcd
@ -205,8 +205,7 @@ have_stash () {
|
|||||||
|
|
||||||
list_stash () {
|
list_stash () {
|
||||||
have_stash || return 0
|
have_stash || return 0
|
||||||
git log --no-color --pretty=oneline -g "$@" $ref_stash -- |
|
git log --format="%gd: %gs" -g "$@" $ref_stash --
|
||||||
sed -n -e 's/^[.0-9a-f]* refs\///p'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
show_stash () {
|
show_stash () {
|
||||||
|
Loading…
Reference in New Issue
Block a user