Add git hide and git unhide scripts.
This commit is contained in:
parent
1211bc1c44
commit
b1b2ea2109
@ -16,6 +16,14 @@ let
|
|||||||
}:$PATH"
|
}:$PATH"
|
||||||
exec ${package}/bin/${prog} "''${@}"
|
exec ${package}/bin/${prog} "''${@}"
|
||||||
'';
|
'';
|
||||||
|
git_hide = pkgs.writeShellScriptBin "git-hide" ''
|
||||||
|
git add --intent-to-add "''${@}"
|
||||||
|
git update-index --skip-worktree --assume-unchange "''${@}"
|
||||||
|
'';
|
||||||
|
git_unhide = pkgs.writeShellScriptBin "git-unhide" ''
|
||||||
|
git update-index --no-skip-worktree --no-assume-unchange "''${@}"
|
||||||
|
git reset "''${@}"
|
||||||
|
'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
@ -41,6 +49,8 @@ in
|
|||||||
{
|
{
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
my_git
|
my_git
|
||||||
|
git_hide
|
||||||
|
git_unhide
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
(lib.mkIf (config.me.git.config != null) {
|
(lib.mkIf (config.me.git.config != null) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user