On Wed, Aug 08, 2007 at 08:41:28PM +0200, Eric Y. Kow wrote: > Hi David, > > Most of these look ok and are going in, except... > > > Mon Aug 6 16:09:27 PDT 2007 David Roundy <[EMAIL PROTECTED]> > > * refactor to expand is_identity and use it to encapsulate "identitiness" > > that I'm not sure I understand this one. > > > +sort_coalesce_composite (x:>:xs) | IsEq <- is_identity x = > > sort_coalesce_composite xs > > Does this make sort_coalesce_composite do new things?
Yes, it does, but these are good things. sort_coalesce_composite is only used on unrecorded changes to mutate them into friendlier and more compact forms, and filtering out identity patches is a Good Thing in this case. I'm sending another patch to rename sort_coalesce_composite and clean up its use just a tad. > > -coalesceFilePatch _ (AddFile :< RmFile) > > - = Just unsafeIdentity > > Is this intentional? If I understand correctly, the code said that > removing a file and re-adding it cancels itself out. Does it no > longer do that, or is it somehow implicit from the changes to the > sort_coalesce_composite code? Actually, this change is made obsolete by: coalesce (p2 :< p1) | IsEq <- p2 =\/= invert p1 = Just null_patch which I guess was either already present, or got added in a separate patch. > > -canonizeHunk _ _ o n | o == n = unsafeIdentity > > Here it seems clearer that the effect is the same because of the > is_identity code added to canonize Right. > Anyway, I guess it's good that you're making me look at this code. Each > time I get a little less scared... (just a little) :) And each time you ask a question, I seem to clean up the code (or docs) a little more... -- David Roundy Department of Physics Oregon State University
signature.asc
Description: Digital signature
_______________________________________________ darcs-devel mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-devel
