From: Elijah Newren via GitGitGadget Date: Sun, 19 Jun 2022 06:50:20 GMT Subject: [PATCH v2 2/6] merge: remove unused variable Message-ID: <230d84f09c8b75d15168d5ff8205b543fa8ca91d.1655621424.git.gitgitgadget@gmail.com> In-Reply-To: From: Elijah Newren restore_state() had a local variable sb that is not used, and in fact, was never used even in the original commit that introduced it, 1c7b76be7d ("Build in merge", 2008-07-07). Remove it. Signed-off-by: Elijah Newren --- builtin/merge.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/builtin/merge.c b/builtin/merge.c index f178f5a3ee1..00de224a2da 100644 --- a/builtin/merge.c +++ b/builtin/merge.c @@ -375,7 +375,6 @@ static void reset_hard(const struct object_id *oid, int verbose) static void restore_state(const struct object_id *head, const struct object_id *stash) { - struct strbuf sb = STRBUF_INIT; const char *args[] = { "stash", "apply", NULL, NULL }; if (is_null_oid(stash)) @@ -391,7 +390,6 @@ static void restore_state(const struct object_id *head, */ run_command_v_opt(args, RUN_GIT_CMD); - strbuf_release(&sb); refresh_cache(REFRESH_QUIET); } -- gitgitgadget