

Proper diffs with ODF files in Git or Mercurial - bergie
http://www-verimag.imag.fr/~moy/opendocument/

======
Karellen
Pretty cool.

Would would be even better would be if:

a) Git diff/merge gets ability to look into zip/archive files, treating them
as sub-trees of files. diff should be not too tricky. Merge is more awkward,
because you have to create a new zip/archive which is compatible with the
format of the parents.

b) Git diff/merge gets ability to work well on XML files, and be XML-element-
based, not line-based.

With those, full version control with branching and merging of ODF files, plus
many other interesting file types, falls out almost "naturally".

~~~
loveatlonglast
git diff/merge on xml files would be really great. will think this over.

------
imurray
I'm not sure if odt2txt puts paragraphs on one line, or flows them. But either
way, if you change a single word in a long paragraph you can get large-looking
diffs. For version-controlled documents it's good to use a word-based diff
rather than a line-based diff.

I use wdiff (although it's slightly kludgy) with documents and colorize the
output: <http://homepages.inf.ed.ac.uk/imurray2/compnotes/cwdiff/>

~~~
fr0sty
'git diff' already supports --word-diff natively.

~~~
imurray
Great! Thanks. I now see that git also has a built-in --color-words option,
and I've added that to my notes. (I don't have a git setup to quickly try
whether that would still work in conjunction with an external diff tool like
oodiff though.)

In the mean time I'm using my (trivial) cwdiff wrapper in place of diff in
tools that don't have a built-in option. I think it could be called from the
oodiff utility here, where it would work equally well with any versioning
system.

