summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2015-01-12 11:38:39 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-01-12 11:38:48 -0800
commitacddf4943234bbddfce4e7857c9fd7f0cfc7546b (patch)
tree3c431f4c2d36925ee157a97ca24fcb7cf1c3cc47
parentMerge branch 'rs/plug-strbuf-leak-in-merge' (diff)
parentcommit-tree: simplify parsing of option -S using skip_prefix() (diff)
downloadtgif-acddf4943234bbddfce4e7857c9fd7f0cfc7546b.tar.xz
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;