All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: git@vger.kernel.org, Stephen Haberman <stephen@exigencecorp.com>,
	Julian Phillips <julian@quantumfyre.co.uk>,
	Jay Soffian <jaysoffian@gmail.com>
Subject: Re: [PATCH] remote: fix status with branch...rebase=preserve
Date: Mon, 09 Dec 2013 13:16:50 -0800	[thread overview]
Message-ID: <xmqqmwk9wwql.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1386421717-27698-1-git-send-email-felipe.contreras@gmail.com> (Felipe Contreras's message of "Sat, 7 Dec 2013 07:08:37 -0600")

Felipe Contreras <felipe.contreras@gmail.com> writes:

> Commit 66713ef (pull: allow pull to preserve merges when rebasing)
> didn't include an update so 'git remote status' parses branch.<name>.rebase=preserve
> correctly, let's do that.
>
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> ---
>  builtin/remote.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/builtin/remote.c b/builtin/remote.c
> index 4e14891..5e4ab66 100644
> --- a/builtin/remote.c
> +++ b/builtin/remote.c
> @@ -309,8 +309,13 @@ static int config_read_branches(const char *key, const char *value, void *cb)
>  				space = strchr(value, ' ');
>  			}
>  			string_list_append(&info->merge, xstrdup(value));
> -		} else
> -			info->rebase = git_config_bool(orig_key, value);
> +		} else {
> +			int v = git_config_maybe_bool(orig_key, value);
> +			if (v >= 0)
> +				info->rebase = v;
> +			else if (!strcmp(value, "preserve"))
> +				info->rebase = 1;
> +		}

Looks correct.  Do we want to add a test?

>  	}
>  	return 0;
>  }

  reply	other threads:[~2013-12-09 21:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-07 13:08 [PATCH] remote: fix status with branch...rebase=preserve Felipe Contreras
2013-12-09 21:16 ` Junio C Hamano [this message]
2013-12-09 21:18 ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqmwk9wwql.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jaysoffian@gmail.com \
    --cc=julian@quantumfyre.co.uk \
    --cc=stephen@exigencecorp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.