From: Junio C Hamano <junkio@cox.net>
To: Linus Torvalds <torvalds@osdl.org>
Cc: git@vger.kernel.org
Subject: Re: 3-way read-tree case matrix.
Date: Tue, 07 Jun 2005 22:32:48 -0700 [thread overview]
Message-ID: <7v7jh5ct1b.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <7vzmu1ec7w.fsf_-_@assigned-by-dhcp.cox.net> (Junio C. Hamano's message of "Tue, 07 Jun 2005 20:53:07 -0700")
I suspect my mailer dropped your response on the floor when it
polled my ISP at around 21:27 my time. I found its log
mentioning your address but no message in my mailbox.
Since the last message I sent you, I updated read-tree.c to
match the proposed behaviour, and I found a couple of problems
with it by running the 3-way merge test we already have. I am
attaching a revised one. I have not finished a new test suite
that runs on a populated index file yet, which is what I plan to
do next.
There is one thing that the proposed table changes from the
traditional 3-way merge semantics. I think this is a sensible
change.
- #2 and #3 (I botched #3 in the earlier one I sent you);
traditionally we left <O,H,M>=<none,none,exists> and
<O,H,M>=<none,exists,none> cases to the script policy; we
could salvage a (potentially dirty) cache entry if we say we
pick the one created in only one branch.
Earlier I botched <O,H,M>=<some,H!=O,M!=O> case in the table; we
should collapse to H/M if H==M; this is now handled differently
from H!=O,M!=O,H!=M case (case #10) as case #11 in the updated
table.
------------
"git-diff-tree -m O H M"
O H M result index requirements
------------------------------------------------------------------
1 missing missing missing - must not exist.
-----------------------------------------------------------------
2 missing missing exists take M must match M, if exists.
-----------------------------------------------------------------
3 missing exists missing take H must match H, if exists.
-----------------------------------------------------------------
4 missing exists exists no merge must match H and be
up-to-date, if exists.
-----------------------------------------------------------------
5 exists missing missing no merge must not exist.
-----------------------------------------------------------------
6 exists missing O==M remove must not exist.
-----------------------------------------------------------------
7 exists missing O!=M no merge must not exist.
-----------------------------------------------------------------
8 exists O==H missing remove must match H and be
up-to-date, if exists.
-----------------------------------------------------------------
9 exists O!=H missing no merge must match H and be
up-to-date, if exists.
-----------------------------------------------------------------
10 exists O!=H O!=M no merge must match H and be
M!=H up-to-date, if exists.
-----------------------------------------------------------------
11 exists O!=H O!=M take H must match H, if exists.
M==H
-----------------------------------------------------------------
12 exists O!=H O==M take H must match H, if exists.
-----------------------------------------------------------------
13 exists O==H O!=M take M if exists, must either (1)
match H and be up-to-date,
or (2) match M.
-----------------------------------------------------------------
14 exists O==H O==M take M must match H if exists.
------------------------------------------------------------------
In all "take H" or "take M" cases, if the original index matches
what is taken, I would reuse it, and keep it dirty if it is.
The goal is, "(a) do not clobber the current index; (b) arrive
at the same result as in the case started with an empty index;
(c) favor success over failure as long as (a) and (b) are
satisfied."
next prev parent reply other threads:[~2005-06-08 5:29 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-05 21:39 [PATCH] Documentation: describe git extended diff headers Junio C Hamano
2005-06-05 22:11 ` Linus Torvalds
2005-06-05 22:25 ` [PATCH] Fix diff.c to match rename extended header to the document Junio C Hamano
2005-06-05 22:27 ` [PATCH] Fix apply.c " Junio C Hamano
2005-06-05 22:33 ` Linus Torvalds
2005-06-05 23:21 ` Last mile for 1.0 Junio C Hamano
2005-06-05 23:45 ` Junio C Hamano
2005-06-06 13:29 ` McMullan, Jason
2005-06-06 0:02 ` Linus Torvalds
2005-06-06 0:46 ` [PATCH] git-whatchanged vs "cvs annotate" Junio C Hamano
2005-06-06 5:43 ` Last mile for 1.0 Thomas Glanzmann
2005-06-06 6:13 ` Linus Torvalds
2005-06-06 6:35 ` Junio C Hamano
2005-06-06 6:44 ` Linus Torvalds
2005-06-06 6:44 ` Thomas Glanzmann
2005-06-06 6:57 ` Linus Torvalds
2005-06-06 7:01 ` Thomas Glanzmann
2005-06-06 7:05 ` Junio C Hamano
2005-06-06 14:37 ` Linus Torvalds
[not found] ` <7vy89ns354.fsf_-_@assigned-by-dhcp.cox.net>
[not found] ` <Pine.LNX.4.58.0506061312520.1876@ppc970.osdl.org>
[not found] ` <Pine.LNX.4.58.0506061403170.1876@ppc970.osdl.org>
[not found] ` <7vekbfnot9.fsf@assigned-by-dhcp.cox.net>
[not found] ` <Pine.LNX.4.58.0506061453400.1876@ppc970.osdl.org>
[not found] ` <7vy89mlmsv.fsf_-_@assigned-by-dhcp.cox.net>
[not found] ` <7vis0qk2jo.fsf_-_@assigned-by-dhcp.cox.net>
[not found] ` <Pine.LNX.4.58.0506070808180.2286@ppc970.osdl.org>
2005-06-08 3:53 ` 3-way read-tree case matrix Junio C Hamano
2005-06-08 5:32 ` Junio C Hamano [this message]
2005-06-08 9:08 ` [PATCH] Tests: read-tree -m test updates Junio C Hamano
2005-06-06 6:45 ` Last mile for 1.0 Junio C Hamano
2005-06-06 7:03 ` Linus Torvalds
[not found] ` <7vacm4ufnl.fsf@assigned-by-dhcp.cox.net>
2005-06-06 14:47 ` 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=7v7jh5ct1b.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