git-nomad
git-nomad copied to clipboard
Delegate to git machinery for `git nomad ls`
We currently hand roll our own printing.
It would be nice to reuse git log --oneline -1 refs/nomad/<host>/<branch> to have git format each ref. Ideas:
The %S format specifier in --pretty to print the ref name exactly as it was passed in the command line.
--decorate-refs looks like it works well:
$ git log --decorate-refs='refs/nomad/*' --oneline -1 refs/nomad/apollo/master
0a96fd2a (refs/nomad/apollo/master) Bump anyhow from 1.0.61 to 1.0.62
--source with explicit ref names:
$ git log --source --oneline -1 refs/nomad/apollo/master
0a96fd2a refs/nomad/apollo/master Bump anyhow from 1.0.61 to 1.0.62
This is ideal:
$ git show --decorate-refs='refs/nomad/*' --oneline --no-patch refs/nomad/apollo/master refs/nomad/boreas/master refs/nomad/boreas/ref
0a96fd2a (refs/nomad/apollo/master) Bump anyhow from 1.0.61 to 1.0.62
4e2973c0 (refs/nomad/boreas/master) Simplify all lifetimes
e8894ec2 (refs/nomad/boreas/ref) cp
Combine with a CLI option that plumbs to --pretty for ultimate flexibility.