0

Git have syntax aware merge strategies. According to the documentation, it has customized strategies intuitively named ada, bibtex, cpp, csharp, fortran, html, java, matlab, objc, pascal, perl, php, python, ruby and tex.

Are there any "third party" git merge strategies aware of Clojure syntax (or at least more lispy syntax)? Something like codeq but for git?

claj
  • 5,172
  • 2
  • 27
  • 30
  • Can you add a specific example of how the default merge strategy fails for Clojure code, and an example of how it should work (possibly from codeq)? Git supports a number of merge strategies and `diff` algorithms already; maybe one of those will work for you. – ChrisGPT was on strike Jan 16 '14 at 12:32
  • 1
    It means merging by line and not by S-expression, `(map inc list)` and `(map (fn[a] ...) list)` are not properly merged and treated as conflict. – guilespi Jan 16 '14 at 13:46
  • updated question with a list* of git merge strategies – claj Jan 16 '14 at 14:42

1 Answers1

1

It is possible to use an external tool for merging.

So even if it's not perfect, you can try using ediff for Clojure files as a merge tool.

You can also try merging within a line breaking on (, [, {.

Community
  • 1
  • 1
guilespi
  • 4,672
  • 1
  • 15
  • 24