Add refs to git log output (#757)

This PR adds the list of references on a commit for the `gl` command
This commit is contained in:
Róbert Kalmár 2024-02-07 16:11:55 +01:00 committed by GitHub
parent 3f824d3f30
commit c8c29728d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -566,9 +566,10 @@ export def _git_log [v num] {
_git_log_stat $num
} else { {} }
let r = do -i {
git log --reverse -n $num --pretty=%h»¦«%s»¦«%aN»¦«%aE»¦«%aD
git log --reverse -n $num --pretty=%h»¦«%s»¦«%aN»¦«%aE»¦«%aD»¦«%D
| lines
| split column "»¦«" sha message author email date
| split column "»¦«" sha message author email date refs
| update refs { split row ", " | where not ($it | is-empty) }
| each {|x| ($x| upsert date ($x.date | into datetime))}
}
if $v {