From: Junio C Hamano <gitster@pobox.com>
To: Thomas Rast <trast@inf.ethz.ch>
Cc: <git@vger.kernel.org>, Michael Haggerty <mhagger@alum.mit.edu>
Subject: Re: [PATCH 2/3] merge-recursive: untangle double meaning of o->call_depth
Date: Sun, 07 Jul 2013 11:37:08 -0700 [thread overview]
Message-ID: <7v1u7a43or.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <7e823a9faedf1980912628c3a3f083e26fb0c650.1373219466.git.trast@inf.ethz.ch> (Thomas Rast's message of "Sun, 7 Jul 2013 20:02:39 +0200")
Thomas Rast <trast@inf.ethz.ch> writes:
> o->call_depth has a double function: a nonzero call_depth means we
> want to construct virtual merge bases, but it also means we want to
> avoid touching the worktree. Introduce a new flag o->no_worktree for
> the latter.
I do remember discussing this with you the other day, and while I do
agree that we may not want to touch the working tree in the
outermost merge (i.e. o->call_depth is zero) in some applications, I
do not think of a situation where you _do_ want to touch working
tree while performing the inner merge. I'd feel safer if the code
said that "no matter what no-worktree option says, we won't touch
the working tree if o->call_depth is not zero" clearly in some way,
e.g.
if (o->call_depth || o->in_index_merge)
return; /* leave without touching working tree */
In other words, I do not like the part of the code that pretends
these two are independent options, when what we really want is to
have two modes for the outermost (o->call_depth == 0) case.
next prev parent reply other threads:[~2013-07-07 18:37 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-07 18:02 [PATCH 0/3] merge -Xindex-only Thomas Rast
2013-07-07 18:02 ` [PATCH 1/3] merge-recursive: remove dead conditional in update_stages() Thomas Rast
2013-07-07 18:02 ` [PATCH 2/3] merge-recursive: untangle double meaning of o->call_depth Thomas Rast
2013-07-07 18:37 ` Junio C Hamano [this message]
2013-07-07 18:02 ` [PATCH 3/3] merge-recursive: -Xindex-only to leave worktree unchanged Thomas Rast
2013-07-08 15:21 ` [PATCH 0/3] merge -Xindex-only Michael Haggerty
2013-07-08 15:44 ` Thomas Rast
2013-07-09 9:44 ` Michael Haggerty
2013-07-09 12:08 ` Thomas Rast
2013-07-09 19:38 ` Michael Haggerty
2013-07-09 20:01 ` Thomas Rast
2013-10-26 14:40 ` Thomas Rast
2013-10-26 14:43 ` [PATCH 1/3] merge-recursive: remove dead conditional in update_stages() Thomas Rast
2013-10-26 14:43 ` [PATCH 2/3] merge-recursive: internal flag to avoid touching the worktree Thomas Rast
2013-10-26 14:43 ` [PATCH 3/3] merge-recursive: -Xindex-only to leave worktree unchanged Thomas Rast
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7v1u7a43or.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=mhagger@alum.mit.edu \
--cc=trast@inf.ethz.ch \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).