Can arc diff exclude certain files in Phabricator?

Some C ++ files are created by the system and do not need to be checked. In addition, these files are quite large, and sometimes this leads to the fact that "the request exceeds the capacity limit." The best place to review it is to compare the new schema with the old schema files. These files are part of the commit, so I don't want to use .gitignore for them.

This is another post about this that I found on the Internet, but it did not help. http://www.quora.com/Can-I-use-arc-diff-to-exclude-some-files-in-Phabricator

+4
source share
1 answer

I did a few searches and found out the answers myself.

Perhaps you accidentally included something that is not suitable for checking a person, for example. binary files or generated files.

The solution includes:

  • If you put the @generated line @generated in the file, then Differential will not try to view it. (this may not prevent the arcanist from trying to download it, however)

  • If you set the --less-context flag to the arcanist, and instead of sending entire files, he will send only a small amount of the surrounding context.

  • Use .gitattributes . Here's an example of using .gitattributes to exclude message files from diffs, see the Git book for more information. Please note that you may need to commit the new .gitattributes before it .gitattributes your differences.

     *_hugetext.h -diff *_hugetext.cpp -diff 
  • arc diff --skip-binaries If you mark the file as binary and set the --skip-binaries flag, then the arcanist will not try to download it. Please see the Git book for an example of marking a file as binary.

  • git diff origin/master... --stat If you use Git, you can get more information about why your diff is large, using this command to learn diff stat . (if your base is origin/master )

  • git diff origin/master... | wc --bytes git diff origin/master... | wc --bytes If you use Git, you can easily see what size diff arcanist is trying to load with this command. (if your base is origin/master )

+7
source

All Articles