blob: 060ba744991d9605b2fcf79f48c3a9c6d75050a8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#!/bin/sh
# Copyright © 2024 Sean Whitton
# SPDX-License-Identifier: MIT
if [ $# -gt 1 ]; then
echo >&2 "usage: git rl [<ref>]"
exit 255
fi
git reflog show -10 --color=always \
--format="* %C(black white)%h%Creset..:%x09\
%C(red bold)%gd%Creset%x09\
%C(black white)%>(15)%cr %Creset%x09\
%C(cyan bold)%gs%Creset" \
"${1:-$(git symbolic-ref --short HEAD)}" \
| sed -e 's# ago \[m\t# \[m\t#' -e 's#: #\[m\t#' \
| column -t -s\ -o\ -l5 -T5
|