git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Richard Hansen <rhansen@bbn.com>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: git@vger.kernel.org, Andreas Krey <a.krey@gmx.de>,
	John Keeping <john@keeping.me.uk>, Jeff King <peff@peff.net>,
	Philip Oakley <philipoakley@iee.org>,
	sandals@crustytoothpaste.net
Subject: Re: [PATCH v3 1/5] pull: rename pull.rename to pull.mode
Date: Mon, 09 Sep 2013 17:23:54 -0400	[thread overview]
Message-ID: <522E3C6A.3070409@bbn.com> (raw)
In-Reply-To: <1378689796-19305-2-git-send-email-felipe.contreras@gmail.com>

On 2013-09-08 21:23, Felipe Contreras wrote:
> The old configurations still work, but get deprecated.

Should some tests for the deprecated configs be added?  We wouldn't want
to accidentally break those.

> diff --git a/Documentation/config.txt b/Documentation/config.txt
> index ec57a15..9489a59 100644
> --- a/Documentation/config.txt
> +++ b/Documentation/config.txt
> @@ -760,11 +760,11 @@ branch.<name>.mergeoptions::
>  	option values containing whitespace characters are currently not
>  	supported.
>  
> -branch.<name>.rebase::
> -	When true, rebase the branch <name> on top of the fetched branch,
> -	instead of merging the default branch from the default remote when
> -	"git pull" is run. See "pull.rebase" for doing this in a non
> -	branch-specific manner.
> +branch.<name>.pullmode::
> +	When "git pull" is run, this determines if it would either merge or
> +	rebase the fetched branch. The possible values are 'merge' and
> +	'rebase'. See "pull.mode" for doing this in a non branch-specific
> +	manner.
>  +
>  *NOTE*: this is a possibly dangerous operation; do *not* use
>  it unless you understand the implications (see linkgit:git-rebase[1]
> @@ -1820,11 +1820,11 @@ pretty.<name>::
>  	Note that an alias with the same name as a built-in format
>  	will be silently ignored.
>  
> -pull.rebase::
> -	When true, rebase branches on top of the fetched branch, instead
> -	of merging the default branch from the default remote when "git
> -	pull" is run. See "branch.<name>.rebase" for setting this on a
> -	per-branch basis.
> +pull.mode::
> +	When "git pull" is run, this determines if it would either merge or
> +	rebase the fetched branch. The possible values are 'merge' and
> +	'rebase'. See "branch.<name>.pullmode" for doing this in a non
> +	branch-specific manner.
>  +
>  *NOTE*: this is a possibly dangerous operation; do *not* use
>  it unless you understand the implications (see linkgit:git-rebase[1]

Somewhere something should mention what the default values are
(branch.<name>.pullmode defaults to pull.mode and pull.mode defaults to
merge).

> diff --git a/git-pull.sh b/git-pull.sh
> index f0df41c..de57c1d 100755
> --- a/git-pull.sh
> +++ b/git-pull.sh
> @@ -43,10 +43,24 @@ log_arg= verbosity= progress= recurse_submodules= verify_signatures=
>  merge_args= edit=
>  curr_branch=$(git symbolic-ref -q HEAD)
>  curr_branch_short="${curr_branch#refs/heads/}"
> -rebase=$(git config --bool branch.$curr_branch_short.rebase)
> +mode=$(git config branch.${curr_branch_short}.pullmode)
> +if test -z "$mode"
> +then
> +	mode=$(git config pull.mode)
> +fi
> +test "$mode" == 'rebase' && rebase="true"
>  if test -z "$rebase"
>  then
> -	rebase=$(git config --bool pull.rebase)
> +	rebase=$(git config --bool branch.$curr_branch_short.rebase)
> +	if test -z "$rebase"
> +	then
> +		rebase=$(git config --bool pull.rebase)
> +	fi
> +	if test "$rebase" = 'true'
> +	then
> +		echo "The configurations pull.rebase and branch.<name>.rebase are deprecated."
> +		echo "Please use pull.mode and branch.<name>.pullmode instead."
> +	fi
>  fi
>  dry_run=
>  while :

These deprecation warning messages should be written to stderr, and
should probably be prefixed with "WARNING: ".

-Richard

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

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-09  1:23 [PATCH v3 0/5] Preparation for non-ff pulls by default Felipe Contreras
2013-09-09  1:23 ` [PATCH v3 1/5] pull: rename pull.rename to pull.mode Felipe Contreras
2013-09-09 21:23   ` Richard Hansen [this message]
2013-09-09 22:49     ` Felipe Contreras
2013-09-10  2:21       ` Jeff King
2013-09-10  6:46         ` Felipe Contreras
2013-09-10  6:52           ` Jeff King
2013-09-10  8:16           ` Matthieu Moy
2013-10-11 23:56             ` Felipe Contreras
2013-10-12  0:32               ` Richard Hansen
2013-10-12  0:50               ` Jeff King
2013-10-12  1:15                 ` Felipe Contreras
2013-10-12  1:25                   ` Jeff King
2013-10-12  2:08                     ` Felipe Contreras
2013-10-12  4:40                       ` Richard Hansen
2013-10-12  6:21                         ` Felipe Contreras
2013-09-19 19:33       ` Richard Hansen
2013-10-11 23:54         ` Felipe Contreras
2013-09-10 21:34   ` Junio C Hamano
2013-09-09  1:23 ` [PATCH v3 2/5] pull: refactor $rebase variable into $mode Felipe Contreras
2013-09-09  1:23 ` [PATCH v3 3/5] pull: add --merge option Felipe Contreras
2013-09-09  1:23 ` [PATCH v3 4/5] pull: add merge-ff-only option Felipe Contreras
2013-09-09  1:23 ` [PATCH v3 5/5] pull: add warning on non-ff merges Felipe Contreras
2013-09-09  1:49   ` Felipe Contreras

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=522E3C6A.3070409@bbn.com \
    --to=rhansen@bbn.com \
    --cc=a.krey@gmx.de \
    --cc=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=john@keeping.me.uk \
    --cc=peff@peff.net \
    --cc=philipoakley@iee.org \
    --cc=sandals@crustytoothpaste.net \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).