[clang] [emacs][clang-format] Add elisp API for clang-format on git diffs (PR #112792)

Campbell Barton via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 20 16:00:33 PST 2024


ideasman42 wrote:

> I don't disagree these are all potential pitfalls (and there are certainly more), I just don't see how having the diff code in a separate project ameliorates any of them. And as stated earlier, I think it in fact complicates them.

>From a user perspective it likely just means one extra package,possibly setting a configuration value.
In a sense this PR is incomplete in that it only supports git/diff on Unix like systems.

We could consider a change to the PR that makes it less implementation spesific:

Use `vc-diff` to generate the diff - this abstracts away all the details of calling git or diff directly, personally I would still rather keep the functionality separate - then this can be easily integrated with `hl-diff` or other packages that already track changed lines, removing the overhead of the current method used.



https://github.com/llvm/llvm-project/pull/112792


More information about the cfe-commits mailing list