tkonolige commented on pull request #7235:
URL: https://github.com/apache/tvm/pull/7235#issuecomment-757055740


   `./tests/lint/git-clang-format.sh upstream/main` is incorrect if you are 
behind main. Also some people have origin point to apache/tvm and some have it 
pointing to their fork. Every time I try to run make format, I get `fatal: 
ambiguous argument 'origin/main': unknown revision or path not in the working 
tree.`.
   
   We have a couple options:
   - Use the script here, which complicated but works for any remote name.
   - Use `./tests/lint/git-clang-format.sh $(git merge-base main HEAD)` which 
works with any remote name assuming the user has a main branch. This may 
accidentally format commits to main if it is not up to date with 
apache/tvm/main.
   - Use `./tests/lint/git-clang-format.sh $(git merge-base origin/main HEAD)` 
which will not work if the origin does not name a remote, and will format extra 
commits if origin/main is not up to date with apache/tvm/main.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to