After upgrading clang_format to version 3.8 I noticed that each time it formats a source file it leaves a .TMP file around. For example:
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory
modified: src/mongo/db/commands.cpp
modified: src/mongo/db/commands.h
Untracked files:
(use "git add <file>..." to include in what will be committed)
src/mongo/db/commands.cpp~RF3ac591c5.TMP
src/mongo/db/commands.cpp~RF3aca5030.TMP
src/mongo/db/commands.h~RF3ac591c5.TMP
Having these files around makes it difficult to run git add src/., because they will get added to the source tree as well.