Re: [PATCH 4/6] push: remove dead code in setup_push_upstream()

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

 



Ramkumar Ramachandra <artagnon@xxxxxxxxx> writes:

> Now that simple has been decoupled from upstream in setup_push_simple(),
> remove the dead code in setup_push_upstream().

Good.

>
> Signed-off-by: Ramkumar Ramachandra <artagnon@xxxxxxxxx>
> ---
>  builtin/push.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/builtin/push.c b/builtin/push.c
> index d8d27d9..783bacf 100644
> --- a/builtin/push.c
> +++ b/builtin/push.c
> @@ -139,7 +139,7 @@ end:
>  	add_refspec(branch->name);
>  }
>  
> -static void setup_push_upstream(struct remote *remote, int simple)
> +static void setup_push_upstream(struct remote *remote)
>  {
>  	struct strbuf refspec = STRBUF_INIT;
>  	struct branch *branch = branch_get(NULL);
> @@ -161,8 +161,6 @@ static void setup_push_upstream(struct remote *remote, int simple)
>  		      "your current branch '%s', without telling me what to push\n"
>  		      "to update which remote branch."),
>  		    remote->name, branch->name);
> -	if (simple && strcmp(branch->refname, branch->merge[0]->src))
> -		die_push_simple(branch, remote);
>  
>  	strbuf_addf(&refspec, "%s:%s", branch->name, branch->merge[0]->src);
>  	add_refspec(refspec.buf);
> @@ -211,7 +209,7 @@ static void setup_default_push_refspecs(struct remote *remote)
>  		break;
>  
>  	case PUSH_DEFAULT_UPSTREAM:
> -		setup_push_upstream(remote, 0);
> +		setup_push_upstream(remote);
>  		break;
>  
>  	case PUSH_DEFAULT_CURRENT:
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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]