summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/simple/git-preview/default.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2018-11-05 18:20:42 +0100
committermakefu <github@syntax-fehler.de>2018-11-05 18:20:42 +0100
commit254e9e62b95951cecadd2b4800c03ef96f95b3c0 (patch)
tree6892ca816d01eb712b80af9dbd79cc6690f21752 /krebs/5pkgs/simple/git-preview/default.nix
parent8b57f04ff84b53742ef6a8a9677560745075ffb1 (diff)
parent100ca928ad483471d61b36bd9e977e34441d404b (diff)
Merge remote-tracking branch 'lassul.us/master'
Diffstat (limited to 'krebs/5pkgs/simple/git-preview/default.nix')
-rw-r--r--krebs/5pkgs/simple/git-preview/default.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/krebs/5pkgs/simple/git-preview/default.nix b/krebs/5pkgs/simple/git-preview/default.nix
index 77826f34b..da1525072 100644
--- a/krebs/5pkgs/simple/git-preview/default.nix
+++ b/krebs/5pkgs/simple/git-preview/default.nix
@@ -9,7 +9,11 @@ writeDashBin "git-preview" ''
preview_name=$(${coreutils}/bin/basename "$preview_dir")
${git}/bin/git worktree add --detach -f "$preview_dir" 2>/dev/null
${git}/bin/git -C "$preview_dir" checkout -q "$head_commit"
- ${git}/bin/git -C "$preview_dir" merge -qm "$merge_message" "$merge_commit"
+ ${git}/bin/git -C "$preview_dir" merge \
+ ''${GIT_PREVIEW_MERGE_STRATEGY+-s "$GIT_PREVIEW_MERGE_STRATEGY"} \
+ -m "$merge_message" \
+ -q \
+ "$merge_commit"
${git}/bin/git -C "$preview_dir" diff "$head_commit.." "$@"
${coreutils}/bin/rm -fR "$preview_dir"
${coreutils}/bin/rm -R .git/worktrees/"$preview_name"