[darcs-users] Feedback on hunk splitting with Darcs 2.4 beta 1

Ganesh Sittampalam ganesh at earth.li
Mon Jan 18 20:40:09 UTC 2010


On Mon, 18 Jan 2010, Eric Kow wrote:

> 1. One proposal that came up recently was to hide the "filler" patch by
>   defaulting it to 'no'; see
>   <http://irclog.perlgeek.de/darcs/2010-01-17#i_1907325>.  I was
>   initially very enthusiastic about this, but after sleeping on it,
>   I realised that this would break hunk splitting (the filler patch
>   is one of the split results)

I'm not sure that this would break hunk splitting.

If you are trying to split a hunk, it's because there's a bit you want and 
a bit you don't want. Because they touch each other, the newly split hunks 
will have a dependency between them, and the order of that dependency is 
determined by the order in which they are created, i.e. you have to keep 
the bit you want in the text you edit. I think this was the confusing 
thing that Mark described where he wasn't allowed to select the bit he 
actually wanted.

Now, you could imagine record having some special knowledge of touching 
hunks and allowing them to commute just for the purposes of selection. But 
that's a road I'm very reluctant to go down as it would be quite messy and 
special-cased.

So given this, having the filler patch default to no still makes sense to 
me, because even in the hunk splitting case, it's by definition the bit 
you don't want.

BTW I do have an implementation of this ready and I'll send it in shortly 
just so it's available to try out.

Ganesh


More information about the darcs-users mailing list