git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] commit-tree: simplify parsing of option -S using skip_prefix()
@ 2014-12-24  0:18 René Scharfe
  2014-12-24  2:06 ` Jonathan Nieder
  0 siblings, 1 reply; 2+ messages in thread
From: René Scharfe @ 2014-12-24  0:18 UTC (permalink / raw)
  To: Git Mailing List; +Cc: Junio C Hamano

Signed-off-by: Rene Scharfe <l.s.r@web.de>
---
 builtin/commit-tree.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/builtin/commit-tree.c b/builtin/commit-tree.c
index 8a66c74..25aa2cd 100644
--- a/builtin/commit-tree.c
+++ b/builtin/commit-tree.c
@@ -66,10 +66,8 @@ int cmd_commit_tree(int argc, const char **argv, const char *prefix)
 			continue;
 		}
 
-		if (!memcmp(arg, "-S", 2)) {
-			sign_commit = arg + 2;
+		if (skip_prefix(arg, "-S", &sign_commit))
 			continue;
-		}
 
 		if (!strcmp(arg, "--no-gpg-sign")) {
 			sign_commit = NULL;
-- 
2.2.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] commit-tree: simplify parsing of option -S using skip_prefix()
  2014-12-24  0:18 [PATCH] commit-tree: simplify parsing of option -S using skip_prefix() René Scharfe
@ 2014-12-24  2:06 ` Jonathan Nieder
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Nieder @ 2014-12-24  2:06 UTC (permalink / raw)
  To: René Scharfe; +Cc: Git Mailing List, Junio C Hamano

René Scharfe wrote:

> Signed-off-by: Rene Scharfe <l.s.r@web.de>
> ---
>  builtin/commit-tree.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>

Thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-12-24  2:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-24  0:18 [PATCH] commit-tree: simplify parsing of option -S using skip_prefix() René Scharfe
2014-12-24  2:06 ` Jonathan Nieder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).