pkgs: git-fixup
This commit is contained in:
parent
6367408497
commit
d56d339de7
3 changed files with 13 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
|||
{ inputs, ... }:
|
||||
{
|
||||
perSystem =
|
||||
{ pkgs, inputs', ... }:
|
||||
{ pkgs, lib, inputs', ... }:
|
||||
{
|
||||
packages.conduit-next = pkgs.callPackage ./conduit {
|
||||
src = inputs.conduit-src;
|
||||
|
@ -16,5 +16,15 @@
|
|||
git commit -eF "$GITDIR/COMMIT_EDITMSG"
|
||||
'';
|
||||
};
|
||||
|
||||
packages.git-fixup = pkgs.writeShellApplication {
|
||||
name = "git-fixup";
|
||||
text = ''
|
||||
git log -n 50 --pretty=format:'%h %s' --no-merges | \
|
||||
${lib.getExe pkgs.fzf} | \
|
||||
cut -c -7 | \
|
||||
xargs -o git commit --fixup
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue