Skip to content

Commit

Permalink
Add refs to git log output (nushell#757)
Browse files Browse the repository at this point in the history
This PR adds the list of references on a commit for the `gl` command
  • Loading branch information
dam4rus committed Feb 7, 2024
1 parent 3f824d3 commit c8c2972
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modules/git/git-v2.nu
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit c8c2972

Please sign in to comment.