lg: Only show signer's name for signed commits

This commit is contained in:
kale 2024-02-27 01:47:44 +01:00
parent 5768c236c5
commit 9264ed5aed
Signed by: kalmenn
GPG key ID: F500055C44BC3834

15
config
View file

@ -32,19 +32,22 @@
s = "status"
# custom git log (inline)
# sed part courtesy of: https://stackoverflow.com/questions/17371955/verifying-signed-git-commits/32038784#comment124980964_32038784
lgi = "!f() { \
git log --graph --branches --all --date=human --color $@ \
--format='%C(bold dim green)%h%C(auto) - %C(yellow)%cr %C(bold)→%C(reset) %s%C(bold black) - %an%C(reset bold yellow)%d %C(reset)<sig>%G?</sig>%C(reset dim white)%GS%C(reset)' | \
--format='%C(bold dim green)%h%C(auto) - %C(yellow)%cr %C(bold)→%C(reset) %s%C(reset bold yellow)%d <an>%an</an> <sig>%G?</sig> <sn>%GS</sn> %C(reset)' | \
sed \
-e 's#<sig>G</sig>#\\x1b[1;32mGood Signature: #' \
-e 's#<an>\\(.*\\)</an> <sig>N</sig> <sn>.*</sn>#\\x1b[0;2;3m- \\1#' \
\
-e 's#<an>.*</an> <sig>\\([^N]\\)</sig>#<sig>\\1</sig>#' \
-e 's#<sn>\\(.*\\)</sn>#\\x1b[0;2;3m\\1#' \
\
-e 's#<sig>G</sig>#\\x1b[0;1;32mGood Signature:#' \
-e 's#<sig>B</sig>#\\x1b[1;31mBAD#' \
-e 's#<sig>U</sig>#\\x1b[1;33mUnknown Trust: #' \
-e 's#<sig>X</sig>#\\x1b[1;32mGood (later expired)#' \
-e 's#<sig>X</sig>#\\x1b[1;32mGood (expired since)#' \
-e 's#<sig>Y</sig>#\\x1b[1;33mExpired Key#' \
-e 's#<sig>R</sig>#\\x1b[1;31mRevoked#' \
-e 's#<sig>E</sig>#\\x1b[1;33mMissing Key#' \
-e 's#<sig>N</sig>##'; \
-e 's#<sig>E</sig>#\\x1b[1;33mMissing Key#'; \
}; f"
# custom git log (always opens in pager)