Fix worktree usage message
PATCH 1/1 Fix worktree usage message
Mark <branch> as optional in worktree command line usage.
Hi, just starting out with development for Git. Found this one super easy to fix, so made a patch :)
--- builtin/worktree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
builtin/worktree.c +1 -1
@@ -10,7 +10,7 @@#include "refs.h" static const char *const worktree_usage[] = { -N_ ("git worktree add [<options>] <path> <branch>" ), +N_ ("git worktree add [<options>] <path> [<branch>]" ),N_ ("git worktree prune [<options>]" ),NULL };
--
2.6.2
Quoted 1 line · Sidhant Sharma
Mark <branch> as optional in worktree command line usage.
Thank you for the patch.
Can you also explain why you mark it as optional in the commit message? That way it's clear why this patch is needed.
Quoted 3 lines
Hi, just starting out with development for Git. Found this one super easy to fix, so made a patch :)
These kind of comments don't belong in the commit message. You could add them below the first three ---. That way, they will not be part of the commit history.
Quoted 24 lines
--- builtin/worktree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)builtin/worktree.c +1
-2@@ -10,7 +10,7 @@#include "refs.h" static const char *const worktree_usage[] = { -N_ ("git worktree add [<options>] <path> <branch>" ), +N_ ("git worktree add [<options>] <path> [<branch>]" ),N_ ("git worktree prune [<options>]" ),NULL }; --2.6.2
--
To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 1/1 Fix worktree usage message
Mark <branch> optional in worktree command line usage to maintain consistency with man pages.
---
It was reported here: http://marc.info/?l=git&m=144514145804787&w=2
builtin/worktree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
builtin/worktree.c +1 -1
@@ -10,7 +10,7 @@#include "refs.h" static const char *const worktree_usage[] = { -N_ ("git worktree add [<options>] <path> <branch>" ), +N_ ("git worktree add [<options>] <path> [<branch>]" ),N_ ("git worktree prune [<options>]" ),NULL };
--
2.6.2
Quoted 1 line · Sidhant Sharma
Mark <branch> optional in worktree command line usage to maintain consistency with man pages.
Thanks for the patch. To clarify that it is the in-code usage string which is incorrect, rather than the man page, how about something like the following as commit message instead?
worktree: usage: denote <branch> as optional with 'add'
Although 1eb07d8 (worktree: add: auto-vivify new branch when <branch> is omitted, 2015-07-06) updated the documentation when <branch> became optional, it neglected to update the in-code usage message. Fix this oversight.
Quoted 3 lines
Reported-by [email protected]Signed-off-by Sidhant Sharma <[email protected]>
Citing the reporter is a nice touch, but drop the blank line between it and the sign-off.
Quoted 16 lines
---
builtin/worktree.c +1
-2@@ -10,7 +10,7 @@#include "refs.h" static const char *const worktree_usage[] = { -N_ ("git worktree add [<options>] <path> <branch>" ), +N_ ("git worktree add [<options>] <path> [<branch>]" ),N_ ("git worktree prune [<options>]" ),NULL }; --2.6.2
PATCH 1/1 worktree: usage: denote <branch> as optional with 'add'
Although 1eb07d8 (worktree: add: auto-vivify new branch when <branch> is omitted, 2015-07-06) updated the documentation when <branch> became optional, it neglected to update the in-code usage message. Fix this oversight.
--- builtin/worktree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
builtin/worktree.c +1 -1
@@ -10,7 +10,7 @@#include "refs.h" static const char *const worktree_usage[] = { -N_ ("git worktree add [<options>] <path> <branch>" ), +N_ ("git worktree add [<options>] <path> [<branch>]" ),N_ ("git worktree prune [<options>]" ),NULL };
--
2.6.2
Re: [PATCH] worktree: usage: denote <branch> as optional with 'add'
Quoted 8 lines · Sidhant Sharma
Although 1eb07d8 (worktree: add: auto-vivify new branch when <branch> is omitted, 2015-07-06) updated the documentation when <branch> became optional, it neglected to update the in-code usage message. Fix this oversight.
Reported-by [email protected]Signed-off-by Sidhant Sharma <[email protected]>---
Thanks.
I'll add "Helped-by: Eric Sunshine <[email protected]>" and queue.
Quoted 18 lines
builtin/worktree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)builtin/worktree.c +1
-2@@ -10,7 +10,7 @@#include "refs.h" static const char *const worktree_usage[] = { -N_ ("git worktree add [<options>] <path> <branch>" ), +N_ ("git worktree add [<options>] <path> [<branch>]" ),N_ ("git worktree prune [<options>]" ),NULL }; --2.6.2