From: Junio C Hamano Date: Thu, 19 May 2022 17:45:06 GMT Subject: Re: [PATCH 1/2] merge: remove unused variable Message-ID: In-Reply-To: <042d624b8159364229e95d35e9309f12b67f8173.1652977582.git.gitgitgadget@gmail.com> "Elijah Newren via GitGitGadget" writes: > 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(-) Nice. Thanks. > > 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); > }