Re: [PATCH 1/2] merge: remove unused variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Elijah Newren via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes:

> From: Elijah Newren <newren@xxxxxxxxx>
>
> 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 <newren@xxxxxxxxx>
> ---
>  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);
>  }



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux