Re: [BUG] two-way read-tree can write null sha1s into index

2013-01-07 Thread Jeff King
On Thu, Jan 03, 2013 at 02:33:09PM -0800, Junio C Hamano wrote: > Jeff King writes: > > > Oh, I agree it's insane to try to carry through unmerged entries. I'm > > just concerned that not all code paths are careful enough to check. > > I would actually be surprised if some code path do assume s

Re: [BUG] two-way read-tree can write null sha1s into index

2013-01-03 Thread Junio C Hamano
Jeff King writes: > Oh, I agree it's insane to try to carry through unmerged entries. I'm > just concerned that not all code paths are careful enough to check. I would actually be surprised if some code path do assume somebody might give them an index with conflicting entries in it and guard aga

Re: [BUG] two-way read-tree can write null sha1s into index

2013-01-03 Thread Jeff King
On Thu, Jan 03, 2013 at 12:34:27PM -0800, Junio C Hamano wrote: > Jeff King writes: > > > Or are you suggesting that the three-way case should always be protected > > by checking that there are no unmerged entries before we start it? That > > seems sane to me, but I haven't confirmed that that i

Re: [BUG] two-way read-tree can write null sha1s into index

2013-01-03 Thread Junio C Hamano
Jeff King writes: > Or are you suggesting that the three-way case should always be protected > by checking that there are no unmerged entries before we start it? That > seems sane to me, but I haven't confirmed that that is the case. I think the normal (and hopefully only) "-m -u O A B" use case

Re: [BUG] two-way read-tree can write null sha1s into index

2013-01-03 Thread Jeff King
On Thu, Jan 03, 2013 at 07:34:53AM -0800, Junio C Hamano wrote: > > Good point; I was just thinking about the --reset case. > > > > With "-m", though, we could in theory carry over the unmerged entries > > (again, assuming that "old" and "new" are the same; otherwise it is an > > obvious reject).

Re: [BUG] two-way read-tree can write null sha1s into index

2013-01-03 Thread Junio C Hamano
Jeff King writes: > On Tue, Jan 01, 2013 at 02:24:46PM -0800, Junio C Hamano wrote: > >> Jeff King writes: >> >> > So I think we need to update twoway_merge to recognize unmerged entries, >> > which gives us two options: >> > >> > 1. Reject the merge. >> > >> > 2. Throw away the current unm

Re: [BUG] two-way read-tree can write null sha1s into index

2013-01-03 Thread Jeff King
On Tue, Jan 01, 2013 at 02:24:46PM -0800, Junio C Hamano wrote: > Jeff King writes: > > > So I think we need to update twoway_merge to recognize unmerged entries, > > which gives us two options: > > > > 1. Reject the merge. > > > > 2. Throw away the current unmerged entry in favor of the "ne

Re: [BUG] two-way read-tree can write null sha1s into index

2013-01-01 Thread Junio C Hamano
Jeff King writes: > So I think we need to update twoway_merge to recognize unmerged entries, > which gives us two options: > > 1. Reject the merge. > > 2. Throw away the current unmerged entry in favor of the "new" entry > (when old and new are the same, of course; otherwise we would >

[BUG] two-way read-tree can write null sha1s into index

2012-12-29 Thread Jeff King
On Sat, Dec 29, 2012 at 06:05:41AM -0500, Jeff King wrote: > [clear state from last run] > $ rm -rf .git/rebase-apply > $ git reset --hard > > [apply the patch; we get a conflict] > $ git am -3sc > queue-3.2/alsa-usb-audio-fix-missing-autopm-for-midi-input.patch > > [now run just th