On Mon, 5 Sep 2005, Linus Torvalds wrote:
> On Mon, 5 Sep 2005, Fredrik Kuivinen wrote:
> > After a quick look through the diff source I didn't find anything
> > else. It's quite possible that I haved missed something though. Most
> > of the translated messages are related to error reporting, which I
> > guess might be nice to have in the user specified language.
> Is it possible that we could integrate the "diff" algorithm into git, and
> get rid of the dependency on an external GNU diff? It would also make the
> portability problems go away (ie old diff's being broken).
> It would also potentially speed up the normal built-in diff a lot, since
> we wouldn't have to execute a whole other program to generate a diff, just
> call a helper function the way we do for xdiff..
The algorithm actually used by GNU diff is pretty complicated, and I don't
really understand the actual implementation, which evidentally has a few
important refinements over the original paper.
I've written my own diff, mainly to try a different algorithm, and it
seems to work, but the code isn't yet appropriate to submit. This
algorithm also has the advantage that it can identify moved sections and
is less interested in interleaving a removed function with a new function
to provide the shortest possible diff. I expect that I could get it to
work if I put in a day on it; it's mostly writing a hashtable
implementation for non-NULL-terminated string-keyed hash tables.
*This .sig left intentionally blank*
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html