Binary files missing from patch file for Perforce

Still need help?

The Atlassian Community is here for you.

Ask the community


When executing the script to create a pre-commit patch file for review, specific file(s) are not included in the resulting patch file. 


To diagnose this issue, you will need to enable debug mode for -d

In your debug output, you will see the following:

DEBUG:root:Omitting binary file


For Perforce, binaries are just one type of files that are excluded when generating patches using the script. These file types currently are:

  • binary 
  • xbinary
  • ubinary
  • uxbinary
  • tempobj
  • ctempobj
  • xtempobj
  • symlink

The omission of these files via the script is by design.


According to the Perforce User's Guide:

Perforce first determines whether the file is a regular file or a symbolic link, and then examines the first part of the file to determine whether it's text or binary. If any nontext characters are found, the file is assumed to be binary; otherwise, the file is assumed to be text.

If you believe that your file was marked as binary mistakenly, you are able to change the file type by specifying the following option in Perforce:

Last modified on Oct 3, 2018

Was this helpful?

Provide feedback about this article
Powered by Confluence and Scroll Viewport.