diff options
author | René Scharfe <l.s.r@web.de> | 2014-12-24 01:18:11 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-12-29 09:32:45 -0800 |
commit | 8547e0f17697affd24d7a185245f0442af246f40 (patch) | |
tree | 7f33374d32cf4948b8e0bf8dd91f0bb8c0aa0a87 | |
parent | Prepare for 2.2.2 (diff) | |
download | tgif-8547e0f17697affd24d7a185245f0442af246f40.tar.xz |
commit-tree: simplify parsing of option -S using skip_prefix()
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | builtin/commit-tree.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/builtin/commit-tree.c b/builtin/commit-tree.c index 8a66c74e0f..25aa2cdef3 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; |