Re: git-name-rev off-by-one bug
- From
Junio C Hamano <junkio@cox.net>
- Date
- Nov 30, 2005, 22:00 UTC
- Message-ID
- <7vy835okxs.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <Pine.LNX.4.64.0511301514500.25300@iabervon.org>
Daniel Barkalow <barkalow@iabervon.org> writes:
Show 8 quoted lines
> I actually had that problem with the original tables; there isn't a > canonical order in which to list a table of all of the possible matches > and non-matches between items so as to be complete. > > Perhaps it ought to list, on each line, which previous cases would match, > so that you could see that case 2 is really the conditions of 2 minus the > conditions for 2ALT, which is "all of the ancestors are empty, the head > has a directory/file conflict, and remote exists."
Sorry, I was not clear about it when I did that table the first time. 2ALT was "alternatives suggested to replace 2" and listed in the same table for comparison purpose.
The original table was designed in a way that if you have a match on case N, there would not be any other case M that matches the case, either N<M or M<N. IOW, the order to read the table did not matter. At least that was the intention.
If you read "missing" = 0, "exists" = 1, and take OAB as bit2, bit1, and bit0, you can easily see the pattern in the table. It counts in binary, although bit1 has various subcases so the table has more than 8 rows, and it is easy to see it covers all.
Show 5 quoted lines
> "If the index exists, it is an error for it not to match either the > head or (if the merge is trivial) the result." > > "A result of "no merge" is an error if the index is not empty and not > up-to-date."
That is good.
> Certainly, your complaints about the table should be addressed first. I > think I'd addressed all your complaints from last time, but at that point, > we got sidetracked into a discussion of the details of case #16.
... which was a good thing to think about in itself. I feel I understand the new table a bit better.