From: Ciaran <ciaranj@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, David Aguilar <davvid@gmail.com>
Subject: Re: [RFC PATCH] Pass empty file to p4merge where no base is suitable.
Date: Sun, 1 May 2011 23:08:24 +0100 [thread overview]
Message-ID: <BANLkTikv0YmB-u74sOrQUQZGQvYJNmBx_w@mail.gmail.com> (raw)
In-Reply-To: <7v7haarsrd.fsf@alter.siamese.dyndns.org>
On Sun, May 1, 2011 at 10:54 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Ciaran <ciaranj@gmail.com> writes:
>
>>> I suspect that you may be able to simply use "$BASE" for that, no? It
>>> will be cleaned up when cleanup_temp_files() is run anyway (warning: I do
>>> not use mergetool, and I am writing this only from my cursory looking of
>>> the script, so take this with a large grain of salt).
>> I don't think so, the BASE file isn't created at-all in this scenario afaict.
>
> Hmm, just like $BASE, your .no-base is not created at all in this scenario
> either, but you create it yourself in your patch, and because you picked a
> new filename for that temporary file, you also need to worry about
> cleaning it up.
>
> Why can't that temporary file be "$BASE"? That is what I was asking.
> Then you would still create an empty file (but see *1*), and can rely on
> existing codepaths to clean it up.
>
> IOW, wouldn't it be far simpler to turn the part you are patching into
> these three lines?
>
> $base_present || >"$BASE"
> "$merge_tool_path" "$BASE" "$LOCAL" "$REMOTE" "$MERGED"
> check_unchanged
Yes, that is a *much* better solution that solves my issue perfectly
;) Patch to follow.
<!-- Snip -->
> [Footnote]
>
> *1* It also may be worth considering to employ the "use either an empty
> file or use the common parts of merged files, whichever makes the
> merge simpler, as a phony base" technique found in git-merge-one-file.
>
I did consider your earlier post on this, but it seems that that
perforce's merge client is sufficiently smart enough to do this
alignment/matching itself, so the effort isn't required (imho) for
this client (which is the client that I'm experiencing 'pain' with atm
!
Thanks,
- Cj.
next prev parent reply other threads:[~2011-05-01 22:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-19 19:46 [RFC PATCH] Pass empty file to p4merge where no base is suitable Ciaran
2011-04-19 21:33 ` Junio C Hamano
2011-04-19 22:01 ` Junio C Hamano
2011-05-01 20:47 ` Ciaran
2011-05-01 21:54 ` Junio C Hamano
2011-05-01 22:08 ` Ciaran [this message]
2011-05-01 22:16 ` Ciaran
2011-05-01 23:55 ` Junio C Hamano
2011-05-02 0:01 ` Ciaran
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BANLkTikv0YmB-u74sOrQUQZGQvYJNmBx_w@mail.gmail.com \
--to=ciaranj@gmail.com \
--cc=davvid@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).