git-preview: add GIT_PREVIEW_MERGE_STRATEGY
This commit is contained in:
parent
960e66201e
commit
2751c1c3ad
@ -9,7 +9,11 @@ writeDashBin "git-preview" ''
|
|||||||
preview_name=$(${coreutils}/bin/basename "$preview_dir")
|
preview_name=$(${coreutils}/bin/basename "$preview_dir")
|
||||||
${git}/bin/git worktree add --detach -f "$preview_dir" 2>/dev/null
|
${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" 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.." "$@"
|
${git}/bin/git -C "$preview_dir" diff "$head_commit.." "$@"
|
||||||
${coreutils}/bin/rm -fR "$preview_dir"
|
${coreutils}/bin/rm -fR "$preview_dir"
|
||||||
${coreutils}/bin/rm -R .git/worktrees/"$preview_name"
|
${coreutils}/bin/rm -R .git/worktrees/"$preview_name"
|
||||||
|
Loading…
Reference in New Issue
Block a user