From b7e10b2ca210d6a3647910fdecea33581e4eaf0d Mon Sep 17 00:00:00 2001 From: Chris Torek Date: Fri, 12 Jun 2020 16:20:00 +0000 Subject: Documentation: usage for diff combined commits Document the usage for producing combined commits with "git diff". This includes updating the synopsis section. While here, add the three-dot notation to the synopsis. Make "git diff -h" print the same usage summary as the manual page synopsis, minus the "A..B" form, which is now discouraged. Signed-off-by: Chris Torek Signed-off-by: Junio C Hamano --- builtin/diff.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'builtin') diff --git a/builtin/diff.c b/builtin/diff.c index 57bd6c8dfa..96ee2cbb2a 100644 --- a/builtin/diff.c +++ b/builtin/diff.c @@ -24,7 +24,13 @@ #define DIFF_NO_INDEX_IMPLICIT 2 static const char builtin_diff_usage[] = -"git diff [] [ []] [--] [...]"; +"git diff [] [] [--] [...]\n" +" or: git diff [] --cached [] [--] [...]\n" +" or: git diff [] [...] [--] [...]\n" +" or: git diff [] ...] [--] [...]\n" +" or: git diff [] ]\n" +" or: git diff [] --no-index [--] ]\n" +COMMON_DIFF_OPTIONS_HELP; static const char *blob_path(struct object_array_entry *entry) { -- cgit v1.2.3