git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC PATCH] Pass empty file to p4merge where no base is suitable.

From
Ciaran <ciaranj@gmail.com>
Date
May 2, 2011, 00:01 UTC
Message-ID
<BANLkTi=wpxzyn01=g5g1JmjY1UPVQ6faHQ@mail.gmail.com>
In-Reply-To
<7vk4eaq8m3.fsf@alter.siamese.dyndns.org>
On Mon, May 2, 2011 at 12:55 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 22 quoted lines
> Ciaran <ciaranj@gmail.com> writes:
>
>> 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_unchanged
>
> Will queue this version as-is; thanks.
Thank you.
Show 5 quoted lines
>
>
> 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.

The only reason my patch touches it was to 'fix' the whitespace (i.e. it was mixed tabs + space chars, where all the other instances of that line aren't)

I did debate backing that change out though :)
- cj.
Show 5 quoted lines
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
Previous: Junio C Hamano
Message 9 of 9 in “Pass empty file to p4merge where no base is suitable.”
  1. Pass empty file to p4merge where no base is suitable.Ciaran, Apr 19, 2011
  2. Junio C HamanoApr 19, 2011
  3. Junio C HamanoApr 19, 2011
  4. CiaranMay 1, 2011
  5. Junio C HamanoMay 1, 2011
  6. CiaranMay 1, 2011
  7. CiaranMay 1, 2011
  8. Junio C HamanoMay 1, 2011
  9. CiaranMay 2, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.