* [PATCH] Fix worktree usage message
@ 2015-10-18 11:02 Sidhant Sharma
2015-10-18 11:39 ` Kevin Daudt
0 siblings, 1 reply; 6+ messages in thread
From: Sidhant Sharma @ 2015-10-18 11:02 UTC (permalink / raw)
To: git
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(-)
diff --git a/builtin/worktree.c b/builtin/worktree.c
index 71bb770..33d2d37 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] Fix worktree usage message
2015-10-18 11:02 [PATCH] Fix worktree usage message Sidhant Sharma
@ 2015-10-18 11:39 ` Kevin Daudt
2015-10-18 12:15 ` Sidhant Sharma
0 siblings, 1 reply; 6+ messages in thread
From: Kevin Daudt @ 2015-10-18 11:39 UTC (permalink / raw)
To: Sidhant Sharma; +Cc: git
On Sun, Oct 18, 2015 at 04:32:24PM +0530, Sidhant Sharma wrote:
> 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.
>
> 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.
>
> ---
> builtin/worktree.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/builtin/worktree.c b/builtin/worktree.c
> index 71bb770..33d2d37 100644
> --- a/builtin/worktree.c
> +++ b/builtin/worktree.c
> @@ -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 majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] Fix worktree usage message
2015-10-18 11:39 ` Kevin Daudt
@ 2015-10-18 12:15 ` Sidhant Sharma
2015-10-18 16:51 ` Eric Sunshine
0 siblings, 1 reply; 6+ messages in thread
From: Sidhant Sharma @ 2015-10-18 12:15 UTC (permalink / raw)
To: git; +Cc: Sidhant Sharma
Mark <branch> optional in worktree command line usage to maintain consistency with man pages.
Reported-by: ch3cooli@gmail.com
Signed-off-by: Sidhant Sharma <tigerkid001@gmail.com>
---
It was reported here: http://marc.info/?l=git&m=144514145804787&w=2
builtin/worktree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/worktree.c b/builtin/worktree.c
index 71bb770..33d2d37 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] Fix worktree usage message
2015-10-18 12:15 ` Sidhant Sharma
@ 2015-10-18 16:51 ` Eric Sunshine
2015-10-19 4:44 ` [PATCH] worktree: usage: denote <branch> as optional with 'add' Sidhant Sharma
0 siblings, 1 reply; 6+ messages in thread
From: Eric Sunshine @ 2015-10-18 16:51 UTC (permalink / raw)
To: Sidhant Sharma; +Cc: Git List, ch3cooli, Kevin Daudt
On Sun, Oct 18, 2015 at 8:15 AM, Sidhant Sharma <tigerkid001@gmail.com> wrote:
> 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.
> Reported-by: ch3cooli@gmail.com
>
> Signed-off-by: Sidhant Sharma <tigerkid001@gmail.com>
Citing the reporter is a nice touch, but drop the blank line between
it and the sign-off.
> ---
> diff --git a/builtin/worktree.c b/builtin/worktree.c
> index 71bb770..33d2d37 100644
> --- a/builtin/worktree.c
> +++ b/builtin/worktree.c
> @@ -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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] worktree: usage: denote <branch> as optional with 'add'
2015-10-18 16:51 ` Eric Sunshine
@ 2015-10-19 4:44 ` Sidhant Sharma
2015-10-19 6:35 ` Junio C Hamano
0 siblings, 1 reply; 6+ messages in thread
From: Sidhant Sharma @ 2015-10-19 4:44 UTC (permalink / raw)
To: git
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: ch3cooli@gmail.com
Signed-off-by: Sidhant Sharma <tigerkid001@gmail.com>
---
builtin/worktree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/worktree.c b/builtin/worktree.c
index 71bb770..33d2d37 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] worktree: usage: denote <branch> as optional with 'add'
2015-10-19 4:44 ` [PATCH] worktree: usage: denote <branch> as optional with 'add' Sidhant Sharma
@ 2015-10-19 6:35 ` Junio C Hamano
0 siblings, 0 replies; 6+ messages in thread
From: Junio C Hamano @ 2015-10-19 6:35 UTC (permalink / raw)
To: Sidhant Sharma; +Cc: git
Sidhant Sharma <tigerkid001@gmail.com> writes:
> 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: ch3cooli@gmail.com
> Signed-off-by: Sidhant Sharma <tigerkid001@gmail.com>
> ---
Thanks.
I'll add "Helped-by: Eric Sunshine <sunshine@sunshineco.com>" and
queue.
> builtin/worktree.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/builtin/worktree.c b/builtin/worktree.c
> index 71bb770..33d2d37 100644
> --- a/builtin/worktree.c
> +++ b/builtin/worktree.c
> @@ -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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-10-19 6:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-18 11:02 [PATCH] Fix worktree usage message Sidhant Sharma
2015-10-18 11:39 ` Kevin Daudt
2015-10-18 12:15 ` Sidhant Sharma
2015-10-18 16:51 ` Eric Sunshine
2015-10-19 4:44 ` [PATCH] worktree: usage: denote <branch> as optional with 'add' Sidhant Sharma
2015-10-19 6:35 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox