[llvm] Reland pr code format updates (PR #71131)
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 2 18:57:12 PDT 2023
boomanaiden154 wrote:
One thing to note with these changes is that it still doesn't handle merging changes from `main` into the PR branch to update it very well. When someone does this, the n commits within the PR are not in the first n commits anymore. I'm not sure how common of a problem this is as the recommended workflow is to rebase and force push, but I have seen it happen in some cases.
This is somewhat of a regression from the old behavior, but not a complete one from what I understand. Since merging changes the order, especially if done multiple times (like I've seen in some PRs), starting and stopping at a specific revision will pull in more changes than just the commits in the PR. This is somewhat alleviated by only looking at a specific set of files though.
This should probably be fixed at some point (maybe even before this lands given @llvm-beanz's patch should help with quite a few cases). Not sure of the best way to do it though. It would be easiest if we could just pull the merge ref and diff the merge commit, but that doesn't work if there are any merge conflicts (fails to fetch the ref). We could iteratively fetch until we hit the merge base and the only run `clang-format` on individual commits, but I'd rather avoid the iterative fetching if possible.
https://github.com/llvm/llvm-project/pull/71131
More information about the llvm-commits
mailing list