Skip to content

Commit acddf49

Browse files
committed
Merge branch 'rs/simplify-parsing-commit-tree-S'
* rs/simplify-parsing-commit-tree-S: commit-tree: simplify parsing of option -S using skip_prefix()
2 parents d61e790 + 8547e0f commit acddf49

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)