summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2021-01-18 10:53:59 +0100
committertv <tv@krebsco.de>2021-01-18 10:54:25 +0100
commit7b7ebd8708885633c926c21a4b71d5d4ce8931cf (patch)
tree64a5e93cd1b36f0b94ee56e095a6b9bb5b18a48d /krebs/5pkgs
parentbac67993aab5acc7ad33d23e3e8e9a59ce83dc3d (diff)
git-preview: remove redundant copy
Diffstat (limited to 'krebs/5pkgs')
-rw-r--r--krebs/5pkgs/simple/git-preview.nix17
1 files changed, 0 insertions, 17 deletions
diff --git a/krebs/5pkgs/simple/git-preview.nix b/krebs/5pkgs/simple/git-preview.nix
deleted file mode 100644
index d6c9579a7..000000000
--- a/krebs/5pkgs/simple/git-preview.nix
+++ /dev/null
@@ -1,17 +0,0 @@
-{ coreutils, git, writeDashBin }:
-
-writeDashBin "git-preview" ''
- set -efu
- head_commit=$(${git}/bin/git log -1 --format=%H)
- merge_commit=$1; shift
- merge_message='Merge for git-preview'
- preview_dir=$(${coreutils}/bin/mktemp --tmpdir -d git-preview.XXXXXXXX)
- preview_branch=$(${coreutils}/bin/basename "$preview_dir")
- ${git}/bin/git worktree add -b "$preview_branch" "$preview_dir" >/dev/null
- ${git}/bin/git -C "$preview_dir" checkout "$head_commit"
- ${git}/bin/git -C "$preview_dir" merge -m "$merge_message" "$merge_commit"
- ${git}/bin/git -C "$preview_dir" diff "$head_commit.." "$@" &
- ${git}/bin/git branch -fd "$preview_branch"
- ${coreutils}/bin/rm -fR "$preview_dir"
- wait
-''