summaryrefslogtreecommitdiff
path: root/builtin/commit-tree.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2014-12-24 00:18:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-12-29 17:32:45 (GMT)
commit8547e0f17697affd24d7a185245f0442af246f40 (patch)
tree7f33374d32cf4948b8e0bf8dd91f0bb8c0aa0a87 /builtin/commit-tree.c
parentc2e8e4b9da4d007b15faa2e3d407b2fd279f0572 (diff)
downloadgit-8547e0f17697affd24d7a185245f0442af246f40.zip
git-8547e0f17697affd24d7a185245f0442af246f40.tar.gz
git-8547e0f17697affd24d7a185245f0442af246f40.tar.bz2
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>
Diffstat (limited to 'builtin/commit-tree.c')
-rw-r--r--builtin/commit-tree.c4
1 files changed, 1 insertions, 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;