summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-01-12 11:38:39 -0800
committerJunio C Hamano <gitster@pobox.com>2015-01-12 11:38:48 -0800
commitacddf4943234bbddfce4e7857c9fd7f0cfc7546b (patch)
tree3c431f4c2d36925ee157a97ca24fcb7cf1c3cc47
parentd61e79050cd30231456740c3006aca94ed074db0 (diff)
parent8547e0f17697affd24d7a185245f0442af246f40 (diff)
downloadgit-acddf4943234bbddfce4e7857c9fd7f0cfc7546b.tar.gz
Merge branch 'rs/simplify-parsing-commit-tree-S'
* rs/simplify-parsing-commit-tree-S: commit-tree: simplify parsing of option -S using skip_prefix()
-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 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;