1. Drew DeVault
  2. Untitled project
  3. git
  4. Pull requests

improve git-diff documentation and A...B handling

Open
#1 · Created  · Last updated

Description

1 2 3 4 5 6 7 8 9 10 11 12 13 14 git diff -h help is succinct, but perhaps too much so. The symmetric-diff syntax, git diff A...B, is defined by the documentation to compare the merge base of A and B to commit B. It does so just fine when there is a merge base. It compares A and B directly if there is no merge base, and it is overly forgiving of bad arguments after which it can produce nonsensical diffs. The first patch simply adjusts a test that will fail if the second patch is accepted. The second patch adds special handling for the symmetric diff syntax so that the option parsing works, plus a small test suite. The third patch just updates the SYNOPSIS section of the documentation and makes the help output more verbose (to match the SYNOPSIS and provide common diff options like git-diff-files, for instance).

0 attachments

Loading commits...