threads / patch / 57354

patchbuiltin/diff.c: fix "git-diff" usage string typo

Subject: [PATCH] builtin/diff.c: fix "git-diff" usage string typo

## tl;dr

2 messages between Feb 2, 2022 and Feb 2, 2022. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Shaoxuan Yuan· Feb 2, 2022, 07:28 UTC · lore

Remove mistaken right square brackets from "git-diff" usage string. Make the usage string conform to "git-diff" documentation (Documentation/git-diff.txt).

Signed-off-by: Shaoxuan Yuan <shaoxuan.yuan02@gmail.com>
---
 builtin/diff.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Show changes to builtin/diff.c +3 −3
diff --git a/builtin/diff.c b/builtin/diff.c
index fa4683377e..bb7fafca61 100644
--- a/builtin/diff.c
+++ b/builtin/diff.c
@@ -28,9 +28,9 @@ static const char builtin_diff_usage[] =
 "git diff [<options>] [<commit>] [--] [<path>...]\n"
 "   or: git diff [<options>] --cached [--merge-base] [<commit>] [--] [<path>...]\n"
 "   or: git diff [<options>] [--merge-base] <commit> [<commit>...] <commit> [--] [<path>...]\n"
-"   or: git diff [<options>] <commit>...<commit>] [--] [<path>...]\n"
-"   or: git diff [<options>] <blob> <blob>]\n"
-"   or: git diff [<options>] --no-index [--] <path> <path>]\n"
+"   or: git diff [<options>] <commit>...<commit> [--] [<path>...]\n"
+"   or: git diff [<options>] <blob> <blob>\n"
+"   or: git diff [<options>] --no-index [--] <path> <path>\n"
 COMMON_DIFF_OPTIONS_HELP;
 
 static const char *blob_path(struct object_array_entry *entry)
-- 
2.35.0
Christian Couder· Feb 2, 2022, 17:44 UTC · re: Shaoxuan Yuan · lore

Re: [PATCH] builtin/diff.c: fix "git-diff" usage string typo

On Wed, Feb 2, 2022 at 8:29 AM Shaoxuan Yuan <shaoxuan.yuan02@gmail.com> wrote:
Show 6 quoted lines
>
> Remove mistaken right square brackets from "git-diff"
> usage string. Make the usage string conform to "git-diff"
> documentation (Documentation/git-diff.txt).
>
> Signed-off-by: Shaoxuan Yuan <shaoxuan.yuan02@gmail.com>
This looks good to me!

Thanks, Christian.

← back to recent threads