Skip to content

Commit

Permalink
commit-tree: simplify parsing of option -S using skip_prefix()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
René Scharfe authored and Junio C Hamano committed Dec 29, 2014
1 parent c2e8e4b commit 8547e0f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions builtin/commit-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8547e0f

Please sign in to comment.