1
Fork 0
mirror of https://github.com/RGBCube/nu_scripts synced 2025-08-01 06:37:46 +00:00
nu_scripts/modules/git/git_branch_age.nu
Igor 15cb7179e2
Port before_v0.60/math, before_v0.60/parsing and before_v0.60/git (#844)
This PR is part of porting all old scripts #221 and includes a set of
small modules:
- `math`
- `parsing`
- `git`
2024-05-25 10:18:21 -05:00

15 lines
354 B
Text

# Creates a table listing the branches of a git repository and the day of the last commit
export def "git age" [] {
git branch |
lines |
str substring 2.. |
wrap name |
insert last_commit {
get name |
each {
git show $in --no-patch --format=%as | into datetime
}
} |
sort-by last_commit
}