diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt index 7f4c8a8ce7..6236c75c9b 100644 --- a/Documentation/git-diff.txt +++ b/Documentation/git-diff.txt @@ -51,16 +51,20 @@ files on disk. --staged is a synonym of --cached. + If --merge-base is given, instead of using , use the merge base -of and HEAD. `git diff --merge-base A` is equivalent to -`git diff $(git merge-base A HEAD)`. +of and HEAD. `git diff --cached --merge-base A` is equivalent to +`git diff --cached $(git merge-base A HEAD)`. -'git diff' [] [--] [...]:: +'git diff' [] [--merge-base] [--] [...]:: This form is to view the changes you have in your working tree relative to the named . You can use HEAD to compare it with the latest commit, or a branch name to compare with the tip of a different branch. ++ +If --merge-base is given, instead of using , use the merge base +of and HEAD. `git diff --merge-base A` is equivalent to +`git diff $(git merge-base A HEAD)`. 'git diff' [] [--merge-base] [--] [...]:: diff --git a/builtin/diff.c b/builtin/diff.c index b50fc68c2a..4c62876073 100644 --- a/builtin/diff.c +++ b/builtin/diff.c @@ -25,8 +25,8 @@ static const char builtin_diff_usage[] = "git diff [] [] [--] [...]\n" -" or: git diff [] --cached [] [--] [...]\n" -" or: git diff [] [--merge-base] [...] [--] [...]\n" +" or: git diff [] --cached [--merge-base] [] [--] [...]\n" +" or: git diff [] [--merge-base] [...] [--] [...]\n" " or: git diff [] ...] [--] [...]\n" " or: git diff [] ]\n" " or: git diff [] --no-index [--] ]\n"