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 <[email protected]> Reviewed-by: Jonathan Nieder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c2e8e4b commit 8547e0f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

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)