From: Junio C Hamano <gitster@pobox•com>
To: Johannes Schindelin <johannes.schindelin@gmx•de>
Cc: git@vger•kernel.org, Paul Tan <pyokagan@gmail•com>
Subject: Re: [PATCH 2/3] Teach 'git remote' that the config var branch.*.rebase can be 'interactive'
Date: Tue, 12 Jan 2016 15:53:07 -0800 [thread overview]
Message-ID: <xmqqk2nes6cc.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <8c98523f8a3f2c6f2f3db1e4572e05c28f94688d.1452612112.git.johannes.schindelin@gmx.de> (Johannes Schindelin's message of "Tue, 12 Jan 2016 16:22:16 +0100 (CET)")
Johannes Schindelin <johannes.schindelin@gmx•de> writes:
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx•de>
> ---
> builtin/remote.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/builtin/remote.c b/builtin/remote.c
> index 6694cf2..0af8300 100644
> --- a/builtin/remote.c
> +++ b/builtin/remote.c
> @@ -251,7 +251,7 @@ static int add(int argc, const char **argv)
> struct branch_info {
> char *remote_name;
> struct string_list merge;
> - int rebase;
> + enum { NO_REBASE, NORMAL_REBASE, INTERACTIVE_REBASE } rebase;
> };
>
> static struct string_list branch_list;
> @@ -312,6 +312,8 @@ static int config_read_branches(const char *key, const char *value, void *cb)
> info->rebase = v;
> else if (!strcmp(value, "preserve"))
> info->rebase = 1;
This should become NORMAL_REBASE, I would think, even though the
resulting machine code should be identical.
> + else if (!strcmp(value, "interactive"))
> + info->rebase = INTERACTIVE_REBASE;
> }
> }
> return 0;
> @@ -980,7 +982,9 @@ static int show_local_info_item(struct string_list_item *item, void *cb_data)
>
> printf(" %-*s ", show_info->width, item->string);
> if (branch_info->rebase) {
> - printf_ln(_("rebases onto remote %s"), merge->items[0].string);
> + printf_ln(_(branch_info->rebase == INTERACTIVE_REBASE ?
> + "rebases interactively onto remote %s" :
> + "rebases onto remote %s"), merge->items[0].string);
> return 0;
> } else if (show_info->any_rebase) {
> printf_ln(_(" merges with remote %s"), merge->items[0].string);
next prev parent reply other threads:[~2016-01-12 23:53 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-12 15:22 [PATCH 0/3] Support `git pull --rebase=interactive` Johannes Schindelin
2016-01-12 15:22 ` [PATCH 1/3] Teach 'git pull' to handle --rebase=interactive Johannes Schindelin
2016-01-12 23:40 ` Junio C Hamano
2016-01-13 6:52 ` Johannes Schindelin
2016-01-12 15:22 ` [PATCH 2/3] Teach 'git remote' that the config var branch.*.rebase can be 'interactive' Johannes Schindelin
2016-01-12 23:53 ` Junio C Hamano [this message]
2016-01-13 6:51 ` Johannes Schindelin
2016-01-13 9:42 ` Matthieu Moy
2016-01-13 12:03 ` Johannes Schindelin
2016-01-13 12:24 ` Matthieu Moy
2016-01-13 13:26 ` Johannes Schindelin
2016-01-12 15:22 ` [PATCH 3/3] completion: add missing branch.*.rebase values Johannes Schindelin
2016-01-12 23:54 ` Junio C Hamano
2016-01-13 6:57 ` [PATCH v2 0/3] Support `git pull --rebase=interactive` Johannes Schindelin
2016-01-13 6:57 ` [PATCH v2 1/3] pull: allow interactive rebase with --rebase=interactive Johannes Schindelin
2016-01-13 10:33 ` Paul Tan
2016-01-13 12:13 ` Johannes Schindelin
2016-01-13 17:36 ` Junio C Hamano
2016-01-13 18:50 ` Johannes Schindelin
2016-01-13 20:58 ` Junio C Hamano
2016-01-13 6:57 ` [PATCH v2 2/3] remote: handle the config setting branch.*.rebase=interactive Johannes Schindelin
2016-01-13 6:57 ` [PATCH v2 3/3] completion: add missing branch.*.rebase values Johannes Schindelin
2016-01-13 12:17 ` [PATCH v3 0/3] Support `git pull --rebase=interactive` Johannes Schindelin
2016-01-13 12:17 ` [PATCH v3 1/3] pull: allow interactive rebase with --rebase=interactive Johannes Schindelin
2016-01-13 12:17 ` [PATCH v3 2/3] remote: handle the config setting branch.*.rebase=interactive Johannes Schindelin
2016-01-13 12:17 ` [PATCH v3 3/3] completion: add missing branch.*.rebase values Johannes Schindelin
2016-01-13 21:20 ` [PATCH v3 0/3] Support `git pull --rebase=interactive` 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=xmqqk2nes6cc.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=johannes.schindelin@gmx$(echo .)de \
--cc=pyokagan@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox