News for hackers. Stuff that matters.
Re:US Constitution – A Git repo with history of edits by squiggleblaz on Thursday October 24, 2019 @08:25AM (#21343915)

    - But doesn't plain text suck for difs?
    + But doesn't plain text suck for diffs?

    - Especially when you have a really long, multi-line
    - paragraph that has bmore than one change? And if we
    - relied on word wrap, then the scope of change would
    - be the paragraph and all hope is lost. At least 
    - this way we might eventually regain some 
    + Especially when you have an exceptionally long,
    + multi-line paragraph that has more than one change?
    + But if we relied on word wrap, then the scope of
    + change would be the paragraph and all hope is lost.
    + At least this way we might eventually regain some
      equivalency by chance and it's clear that nothing
      after that point has changed.
Git is great, but it's designed for code. Legal documents are probably structured more like code than any other prose with clear identified chunks and frequently breaking out into lists, but it's not the same thing.

(For clarity, I think probably a sentence-by-sentence diff would work well. But then it's not plain text; you're relying on some processor to collect sentences into paragraphs.)

Re:US Constitution – A Git repo with history of edits by ultraism on Thursday October 24, 2019 @01:21PM (#21346846)
Don't use plaintext, use LaTeX. Since paragraphs are separated by an empty line, you can have each sentence on a separate in a paragraph on a separate line and have it still formatted as a paragraph in the final document. This allows for better diffs. Here is an example:

https://github.com/dart-lang/language/blob/master/specificat...

Re:US Constitution – A Git repo with history of edits by dragonwriter on Thursday October 24, 2019 @01:26PM (#21346903)
> Don't use plaintext, use LaTeX

Markdown or Asciidoc has the same benefit as far as paragraphs.

Re:US Constitution – A Git repo with history of edits by ultraism on Thursday October 24, 2019 @02:20PM (#21347522)
Markdown doesn't address table of contents or references which were mentioned above.
Re:US Constitution – A Git repo with history of edits by dragonwriter on Thursday October 24, 2019 @02:49PM (#21347880)
Asciidoc does, and there are TOC tools for markdown, though they are add-ons to markdown processors.
Re:US Constitution – A Git repo with history of edits by azernik on Saturday October 26, 2019 @06:54AM (#21362985)
The diff algorithm/display is orthogonal to the data format; for example, I use the --color-words option to the git tools to use a word-oriented diff everywhere. I've even seen plugins floating around online for visual image diffs in git!

But again, all those tools are built for developers, and especially the ones used by git for internal purposes like for conflict resolution make some strong assumptions that don't hold for prose.