git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] remote: fix status with branch...rebase=preserve

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 9, 2013, 21:16 UTC
Message-ID
<xmqqmwk9wwql.fsf@gitster.dls.corp.google.com>
In-Reply-To
<1386421717-27698-1-git-send-email-felipe.contreras@gmail.com>
Felipe Contreras <felipe.contreras@gmail.com> writes:
Show 26 quoted lines
> 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;
>  }
Previous: Felipe ContrerasNext: Junio C Hamano
Message 2 of 3 in “remote: fix status with branch...rebase=preserve”
  1. remote: fix status with branch...rebase=preserveFelipe Contreras, Dec 7, 2013
  2. Junio C HamanoDec 9, 2013
  3. Junio C HamanoDec 9, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.