Add git-graph script
All checks were successful
/ check (push) Successful in 1m41s

This commit is contained in:
Oliver Davies 2025-07-11 02:00:23 +01:00
parent 3c76e2edea
commit 2bd14ac1a8
3 changed files with 19 additions and 0 deletions

View file

@ -170,6 +170,7 @@ in
home = {
packages = with pkgs; [
git-extras
git-graph
git-trim
stable.git-instafix
];

View file

@ -12,6 +12,7 @@ in
create-script = callPackage ./create-script.nix { };
dev-commit = callPackage ./dev-commit.nix { };
displayselect = callPackage ./displayselect { };
git-graph = callPackage ./git-graph.nix { };
mounter = callPackage ./mounter.nix { };
move-firefox-screenshots = callPackage ./move-firefox-screenshots.nix { };
notes = callPackage ./notes { };

17
packages/git-graph.nix Normal file
View file

@ -0,0 +1,17 @@
{ pkgs }:
pkgs.writeShellApplication {
name = "git-graph";
runtimeInputs = with pkgs; [ git ];
text = ''
# Based on https://github.com/sdaschner/dotfiles/blob/master/bin/git-graph.
git log \
--abbrev-commit \
--all \
--graph \
--pretty=format:"%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%ae>%Creset"
'';
}