[llvm-bugs] [Bug 40860] New: git-clang-format updates modified time of unchanged files

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Feb 26 02:40:44 PST 2019


https://bugs.llvm.org/show_bug.cgi?id=40860

            Bug ID: 40860
           Summary: git-clang-format updates modified time of unchanged
                    files
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: arichardson.kde at gmail.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

Whenever I run git-clang-format followed by ninja, it will recompile all
uncommited files even if git-clang-format did not modify any files.

It seems like git-clang-format will update the modifiation time even for
unchanged files. This is fine for .cpp files but if it touches a commonly used
header I then have to recompile effectively all of my project (this can be
quite significant for commonly used LLVM headers).

It might be possible to write the changed file to a memory buffer, diff that
with the on-disk file and only update that file if any changes have been
detected.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190226/f8e519b2/attachment.html>


More information about the llvm-bugs mailing list