pkgs: add git-commit-last
Small helper which adds a command git commit-last, which, as the name suggests, commits with the last commit message. Useful when the commit fails for whatever reason or something else happens during a commit.
This commit is contained in:
parent
03fcd581a9
commit
367fddb7c0
1 changed files with 8 additions and 0 deletions
|
@ -10,5 +10,13 @@
|
||||||
crane = inputs.crane.lib.${system};
|
crane = inputs.crane.lib.${system};
|
||||||
fenix = inputs'.fenix.packages;
|
fenix = inputs'.fenix.packages;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
packages.git-commit-last = pkgs.writeShellApplication {
|
||||||
|
name = "git-commit-last";
|
||||||
|
text = ''
|
||||||
|
GITDIR="$(git rev-parse --git-dir)"
|
||||||
|
git commit -eF "$GITDIR/COMMIT_EDITMSG"
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue