[PATCH] Don't lie that "binary file has changed"
Alexis S. L. Carvalho
alexis at cecm.usp.br
Sat Feb 17 06:19:19 CST 2007
(replying to the list)
Thus spake tailgunner at smtp.ru:
> >Thus spake tailgunner at smtp.ru:
> >>On Thu, 15 Feb 2007 09:19:12 -0200
> >>"Alexis S. L. Carvalho" wrote:
> >>> Do you have an example of when unidiff is called for two
> >>> (binary) files?
> >>> The case where binary file is renamed
> >Ah, true - but we only detect renames when generating --git patches,
> >in this case we shouldn't call unidiff.
> We still want to know if file changed.
Thinking a bit more, there are some other cases where we can pass
identical files to unidiff (mode changes, revisions with the same
contents, but different parents,...).
> >>> Comparing a and b directly would probably be even faster :)
> >>> Sure, but it would take twice as much memory
> >We already have both strings in memory...
> But we don't have to keep them _both_ simultaneously - this
> might make a difference if both files are large.
True - but performance will likely suffer anyway.
I've pushed your patch with some small changes to crew-stable.
More information about the Mercurial-devel