Skip to content

Commit 8547e0f

Browse files
rscharfegitster
authored andcommitted
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>
1 parent c2e8e4b commit 8547e0f

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

builtin/commit-tree.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,8 @@ int cmd_commit_tree(int argc, const char **argv, const char *prefix)
6666
continue;
6767
}
6868

69-
if (!memcmp(arg, "-S", 2)) {
70-
sign_commit = arg + 2;
69+
if (skip_prefix(arg, "-S", &sign_commit))
7170
continue;
72-
}
7371

7472
if (!strcmp(arg, "--no-gpg-sign")) {
7573
sign_commit = NULL;

0 commit comments

Comments
 (0)