dotfiles

Personal dotfiles
git clone https://git.bracken.jp/dotfiles.git
Log | Files | Refs | LICENSE

commit 201d97651d69ebd0afeaa2b4b731fa0d5468d8b1
parent 7fec21e9406a9ac235a3c5bd0553a84756499031
Author: Chris Bracken <chris@bracken.jp>
Date:   Thu, 22 May 2025 12:30:28 -0700

git: add patch-{diff,stat,files} aliases

Emits a diff against the branch's nearest ancestor on master/main.

Diffstat:
M.config/git/config | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/.config/git/config b/.config/git/config @@ -2,6 +2,13 @@ lol = log --pretty=format:'%C(yellow)%h%C(reset) %C(green)%ci%C(reset) %C(blue)%an%C(reset) %C(yellow)%d%C(reset) %s' logstats = log --pretty=format:'%C(yellow)%h%C(reset) %C(green)%cr%C(reset) %C(blue)%an%C(reset): %s' --stat vimdiff = difftool + + # Output the diff stats + patch for the current patch. + patch-diff = !git diff --patch --stat $(git merge-base HEAD $(git branch | cut -c 3- | grep -E '^master$|^main$')) + # Output just the diff stats for the current patch. + patch-stats = !git diff --stat $(git merge-base HEAD $(git branch | cut -c 3- | grep -E '^master$|^main$')) + # Output just the files modified for the current patch. + patch-files = !git diff --name-only $(git merge-base HEAD $(git branch | cut -c 3- | grep -E '^master$|^main$')) [color] ui = auto [core]