From: Junio C Hamano <junkio@cox.net>
To: Linus Torvalds <torvalds@osdl.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] "checkout-cache -m" writes unmerged contents for each stage.
Date: Sun, 17 Apr 2005 19:44:04 -0700 [thread overview]
Message-ID: <7vfyxovm6j.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <Pine.LNX.4.58.0504171833450.7211@ppc970.osdl.org> (Linus Torvalds's message of "Sun, 17 Apr 2005 19:05:53 -0700 (PDT)")
>>>>> "LT" == Linus Torvalds <torvalds@osdl.org> writes:
LT> I'm actually thinking that maybe the _right_ interface is to do something
LT> like this:
LT> merge-cache <program> <filename>
LT> and what that does is to look up the <filename> in the cache, and if it
LT> has any merge entries, unpack all of them (which may be just one file, of
LT> course) into up to three separate files (mkstemp()), and then execve the
LT> supplied program name with those three files as arguments 1,2,3 (empty
LT> argument if no file), and "filename" as argument 4.
LT> What do you think? I can whip up a "merge-cache" program like that in five
LT> minutes, and it _seems_ like the right interface..
One small detail. What about the "-x" bit?
In case 2 and 3 in your sample merge script, the "merge script"
needs to know what the preferred mode bits are before running
"update-cache --add".
Yes, it can figure that out by running "show-files --unmerged"
and grepping for "$4" by itself, but then it can figure out the
information in "$1" through "$3" by itself as well, so that
makes having merge-cache wrapper less useful to begin with.
I do not think it is realistic for these three related trees to
have files that differ in -x bit, so it would not be that useful
to give the "merge script" the flexibility to pick -x bit value
among three parents --- it would be fine for the merge-cache
wrapper to dictate the value of the -x bit for the resulting
file. So I'd suggest to add an extra parameter to the "merge
script" when merge-cache wrapper calls it.
next prev parent reply other threads:[~2005-04-18 2:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-17 23:03 [PATCH] "checkout-cache -m" writes unmerged contents for each stage Junio C Hamano
2005-04-18 2:05 ` Linus Torvalds
2005-04-18 2:19 ` Junio C Hamano
2005-04-18 3:05 ` Linus Torvalds
2005-04-18 2:44 ` Junio C Hamano [this message]
2005-04-18 2:56 ` Linus Torvalds
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=7vfyxovm6j.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=torvalds@osdl.org \
/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