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
Subject: Re: [PATCH 1/2] merge: enable defaulttoupstream by default
Date: Tue, 22 Apr 2014 12:53:50 -0700	[thread overview]
Message-ID: <xmqqmwfd3zu9.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1398039454-31193-2-git-send-email-felipe.contreras@gmail.com> (Felipe Contreras's message of "Sun, 20 Apr 2014 19:17:33 -0500")

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

> There's no point in this:
>
> % git merge
> fatal: No commit specified and merge.defaultToUpstream not set.
>
> We know the most likely scenario is that the user wants to merge the
> upstream, and if not, he can set merge.defaultToUpstream to false.

And a new possible failure case is when there is no upstream defined
for the current branch, which gets perfectly good new error message:

    $ git merge
    fatal: No remote for the current branch.

So I think this is good.  We want to protect this with a new test,
no?

Will queue as-is for now.

> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> ---
>  Documentation/git-merge.txt | 5 ++---
>  builtin/merge.c             | 2 +-
>  2 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt
> index a3c1fa3..cf2c374 100644
> --- a/Documentation/git-merge.txt
> +++ b/Documentation/git-merge.txt
> @@ -101,9 +101,8 @@ commit or stash your changes before running 'git merge'.
>  	Specifying more than one commit will create a merge with
>  	more than two parents (affectionately called an Octopus merge).
>  +
> -If no commit is given from the command line, and if `merge.defaultToUpstream`
> -configuration variable is set, merge the remote-tracking branches
> -that the current branch is configured to use as its upstream.
> +If no commit is given from the command line, merge the remote-tracking
> +branches that the current branch is configured to use as its upstream.
>  See also the configuration section of this manual page.
>  
>  
> diff --git a/builtin/merge.c b/builtin/merge.c
> index 66d8843..1fc9319 100644
> --- a/builtin/merge.c
> +++ b/builtin/merge.c
> @@ -63,7 +63,7 @@ static int verbosity;
>  static int allow_rerere_auto;
>  static int abort_current_merge;
>  static int show_progress = -1;
> -static int default_to_upstream;
> +static int default_to_upstream = 1;
>  static const char *sign_commit;
>  
>  static struct strategy all_strategy[] = {

  reply	other threads:[~2014-04-22 19:54 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-21  0:17 [PATCH 0/2] Simple default fixes for v2.0 Felipe Contreras
2014-04-21  0:17 ` [PATCH 1/2] merge: enable defaulttoupstream by default Felipe Contreras
2014-04-22 19:53   ` Junio C Hamano [this message]
2014-04-21  0:17 ` [PATCH 2/2] mergetool: run prompt only if guessed tool Felipe Contreras
2014-04-22  4:59   ` David Aguilar
2014-04-22  6:01     ` Charles Bailey
2014-04-22  6:24       ` Felipe Contreras
2014-04-22  6:55         ` Charles Bailey
2014-04-22  6:53           ` Felipe Contreras
2014-04-22  7:30             ` Charles Bailey
2014-04-22  7:56               ` Felipe Contreras
2014-04-23  7:56                 ` Charles Bailey
2014-04-23 17:07                   ` Junio C Hamano
2014-04-24 18:30                     ` Junio C Hamano
2014-04-22 17:19     ` Junio C Hamano
2014-04-23  7:58       ` David Aguilar
2014-04-23 16:52         ` Junio C Hamano
2014-04-22 17:32     ` Junio C Hamano
2014-04-22 19:55       ` 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=xmqqmwfd3zu9.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    /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.