59 bytes, text/x-review-board-request
Hello, I'm new around here. From what I understood, the format that clang-format uses to ignore files is different for mercurial and git. I was referring to https://llvm.org/svn/llvm-project/cfe/trunk/tools/clang-format/git-clang-format and found that git has a different option called 'ignored' that does the same function as .clang-format-ignored. Usage would be: git clang-format ignored dir So I think we should change line 272 from: diff_process = Popen(["git", "diff", "--no-color", "-U0", "HEAD","--","*.c","*.cpp","*.h"], stdout=PIPE) to: diff_process = Popen(["git", "diff", "--no-color", "-U0", "HEAD","--","*.c","*.cpp","*.h", "clang-format", "ignored", "dir"], stdout=PIPE) I don't know how I should mention the directory/file to be ignored. Help would be appreciated. Please assign this bug to me if I have understood the problem correctly.
did you test your change in the code? Thanks
Not yet. I am going to proceed with running "./mach clang-format" on this git repo https://github.com/mozilla/gecko-dev.git and then going to try to fix any errors that may occur. Do you know which command I should use to specifically trigger the bug? Thanks!
You should look for this yourself. This is part of the learning phase!
Comment on attachment 8900921 [details] Bug 1392012 - ./clang-format with git should exclude files from .clang-format-ignore https://reviewboard.mozilla.org/r/172358/#review178456 once more, great work, thanks
Attachment #8900921 - Flags: review?(sledru) → review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/371686fcf5e0 /clang-format with git should exclude files from .clang-format-ignore r=sylvestre
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox57: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.