Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

P4 CLI Documentation | 2025.2

# P4DIFF

The name and location of the diff program used by `p4 resolve` and `p4 diff`.

## Usage notes

Used by Client? | Used by Server? | Command-Line Alternative | Can be set in P4CONFIG file?
--- | --- | --- | ---
Yes | No | None | Yes

## Value if not explicitly set

Operating System | Value
--- | ---
Windows | If the environment variable `DIFF` has been set, then the value of `DIFF`; otherwise, if the environment variable `SHELL` has been set to any value, then the program diff is used; otherwise, `p4diff.exe`.
All Others | If the environment variable `DIFF` has been set, then the value of `DIFF`; otherwise, P4 Server’s internal diff routine is used.

## Examples

`diff`
`diff -b` `windiff.exe`

## Notes

The value of `P4DIFF` can contain options to the called program, for example, `diff -u`.

The commands `p4 describe`, `p4 diff2`, and `p4 submit` all use a diff program built into `p4d`. This cannot be changed.

Your search for returned results