Re: [RFC PATCH] Pass empty file to p4merge where no base is suitable.
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 1, 2011, 23:55 UTC
- Message-ID
- <7vk4eaq8m3.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <BANLkTimD_S3ik7-0j0gMCiEo3aoRwCy92Q@mail.gmail.com>
Ciaran <ciaranj@gmail.com> writes:
Show 18 quoted lines
> diff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh
> index fb3f52b..4db9212 100644
> --- a/git-mergetool--lib.sh
> +++ b/git-mergetool--lib.sh
> @@ -258,12 +258,9 @@ run_merge_tool () {
> ;;
> p4merge)
> if merge_mode; then
> - touch "$BACKUP"
> - if $base_present; then
> - "$merge_tool_path" "$BASE" "$LOCAL" "$REMOTE" "$MERGED"
> - else
> - "$merge_tool_path" "$LOCAL" "$LOCAL" "$REMOTE" "$MERGED"
> - fi
> + touch "$BACKUP"
> + $base_present || >"$BASE"
> + "$merge_tool_path" "$BASE" "$LOCAL" "$REMOTE" "$MERGED"
> check_unchangedWill queue this version as-is; thanks.
Somebody might want to revisit if that "touch" is still really necessary, though. It is outside the scope of this change, as that has been there before this patch.