Subject: [PATCH v4 13/29] rebase: skip stripping of --trailer option prefix

From: Li Chen <[email-masked]>
Date: Tue, 14 Oct 2025 20:24:26 +0800

Removed redundant --trailer= prefix stripping in
validate_trailer_args_after_config() since OPT_STRVEC
already stores only the argument text.

Signed-off-by: Li Chen <[email-masked]>
---
 builtin/rebase.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/builtin/rebase.c b/builtin/rebase.c
index 51fb9388c7..cc90980d7d 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -1128,13 +1128,9 @@ static int validate_trailer_args_after_config(const struct strvec *cli_args,
 				       struct strbuf *err)
 {
 	for (size_t i = 0; i < cli_args->nr; i++) {
-		const char *raw = cli_args->v[i];
-		const char *txt; // Key[:=]Val
+		const char *txt = cli_args->v[i]; // Key[:=]Val
 		const char *sep;
 
-		if (!skip_prefix(raw, "--trailer=", &txt))
-			txt = raw;
-
 		if (!*txt) {
 			strbuf_addstr(err, _("empty --trailer argument"));
 			return -1;
-- 
2.51.0