All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv2 0/4] push.default and branch.<name>.{remote,merge} changes
@ 2009-03-30 10:11 Santi Béjar
  2009-03-30 10:11 ` [PATCHv2 1/4] Documentation: enhance branch.<name>.{remote,merge} Santi Béjar
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Santi Béjar @ 2009-03-30 10:11 UTC (permalink / raw)
  To: git

Hi *,

  the four patches are conceptually independent, but they have textual
dependency.

  The 1st one can also be applied to 'maint'.

Changes from v1:
  rename "tracking branch" to "upstream branch"
  rename push.default to push.mode instead of push.style

Santi Béjar (4):
  Documentation: enhance branch.<name>.{remote,merge}
  Documentation: push.default applies to all remotes
  Documentation: branch.*.merge can also afect 'git-push'
  Rename push.default to push.mode

 Documentation/RelNotes-1.6.3.txt |    2 +-
 Documentation/config.txt         |   21 ++++++++++-----------
 builtin-push.c                   |   16 ++++++++--------
 cache.h                          |   14 +++++++-------
 config.c                         |   10 +++++-----
 environment.c                    |    2 +-
 6 files changed, 32 insertions(+), 33 deletions(-)

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCHv2 1/4] Documentation: enhance branch.<name>.{remote,merge}
  2009-03-30 10:11 [PATCHv2 0/4] push.default and branch.<name>.{remote,merge} changes Santi Béjar
@ 2009-03-30 10:11 ` Santi Béjar
  2009-03-30 10:11 ` [PATCHv2 2/4] Documentation: push.default applies to all remotes Santi Béjar
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 17+ messages in thread
From: Santi Béjar @ 2009-03-30 10:11 UTC (permalink / raw)
  To: git

The documentation for branch.*.merge is very dense, so add a simple
explanation on top of it.

And branch.*.remote also afects 'git push'. Text taken from
'push.default'.

Signed-off-by: Santi Béjar <santi@agolina.net>
---
 Documentation/config.txt |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/Documentation/config.txt b/Documentation/config.txt
index 089569a..fa2595b 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -473,10 +473,14 @@ branch.autosetuprebase::
 	This option defaults to never.
 
 branch.<name>.remote::
-	When in branch <name>, it tells 'git-fetch' which remote to fetch.
-	If this option is not given, 'git-fetch' defaults to remote "origin".
+	When in branch <name>, it tells 'git-fetch' and 'git-push' which
+	remote to fetch/push, and defaults to `origin` if no remote is
+	configured. `origin` is also used if you are not on any branch.
 
 branch.<name>.merge::
+	It defines, together with branch.<name>.remote, the upstream branch
+	for the given branch. It tells 'git-fetch'/'git-pull' which
+	branch to merge.
 	When in branch <name>, it tells 'git-fetch' the default
 	refspec to be marked for merging in FETCH_HEAD. The value is
 	handled like the remote part of a refspec, and must match a
-- 
1.6.1.258.g7ff14

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCHv2 2/4] Documentation: push.default applies to all remotes
  2009-03-30 10:11 [PATCHv2 0/4] push.default and branch.<name>.{remote,merge} changes Santi Béjar
  2009-03-30 10:11 ` [PATCHv2 1/4] Documentation: enhance branch.<name>.{remote,merge} Santi Béjar
@ 2009-03-30 10:11 ` Santi Béjar
  2009-03-30 10:11 ` [PATCHv2 3/4] Documentation: branch.*.merge can also afect 'git-push' Santi Béjar
  2009-03-30 10:11 ` [PATCHv2 4/4] Rename push.default to push.mode Santi Béjar
  3 siblings, 0 replies; 17+ messages in thread
From: Santi Béjar @ 2009-03-30 10:11 UTC (permalink / raw)
  To: git

push.default is not only for the current remote but setting the default
behaviour for all remotes.

Signed-off-by: Santi Béjar <santi@agolina.net>
---
 Documentation/config.txt |   11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/Documentation/config.txt b/Documentation/config.txt
index fa2595b..7ae584f 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -1219,19 +1219,14 @@ push.default::
 	Defines the action git push should take if no refspec is given
 	on the command line, no refspec is configured in the remote, and
 	no refspec is implied by any of the options given on the command
-	line.
-+
-The term `current remote` means the remote configured for the current
-branch, or `origin` if no remote is configured. `origin` is also used
-if you are not on any branch. Possible values are:
+	line. Possible values are:
 +
 * `nothing` do not push anything.
-* `matching` push all matching branches to the current remote.
+* `matching` push all matching branches.
   All branches having the same name in both ends are considered to be
   matching. This is the current default value.
 * `tracking` push the current branch to the branch it is tracking.
-* `current` push the current branch to a branch of the same name on the
-  current remote.
+* `current` push the current branch to a branch of the same name.
 
 rebase.stat::
 	Whether to show a diffstat of what changed upstream since the last
-- 
1.6.1.258.g7ff14

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCHv2 3/4] Documentation: branch.*.merge can also afect 'git-push'
  2009-03-30 10:11 [PATCHv2 0/4] push.default and branch.<name>.{remote,merge} changes Santi Béjar
  2009-03-30 10:11 ` [PATCHv2 1/4] Documentation: enhance branch.<name>.{remote,merge} Santi Béjar
  2009-03-30 10:11 ` [PATCHv2 2/4] Documentation: push.default applies to all remotes Santi Béjar
@ 2009-03-30 10:11 ` Santi Béjar
  2009-03-30 10:35   ` Michael J Gruber
  2009-03-30 16:47   ` Junio C Hamano
  2009-03-30 10:11 ` [PATCHv2 4/4] Rename push.default to push.mode Santi Béjar
  3 siblings, 2 replies; 17+ messages in thread
From: Santi Béjar @ 2009-03-30 10:11 UTC (permalink / raw)
  To: git


Signed-off-by: Santi Béjar <santi@agolina.net>
---
 Documentation/config.txt |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Documentation/config.txt b/Documentation/config.txt
index 7ae584f..38ab785 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -480,7 +480,7 @@ branch.<name>.remote::
 branch.<name>.merge::
 	It defines, together with branch.<name>.remote, the upstream branch
 	for the given branch. It tells 'git-fetch'/'git-pull' which
-	branch to merge.
+	branch to merge and can also afect 'git-push' (see push.default).
 	When in branch <name>, it tells 'git-fetch' the default
 	refspec to be marked for merging in FETCH_HEAD. The value is
 	handled like the remote part of a refspec, and must match a
-- 
1.6.1.258.g7ff14

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCHv2 4/4] Rename push.default to push.mode
  2009-03-30 10:11 [PATCHv2 0/4] push.default and branch.<name>.{remote,merge} changes Santi Béjar
                   ` (2 preceding siblings ...)
  2009-03-30 10:11 ` [PATCHv2 3/4] Documentation: branch.*.merge can also afect 'git-push' Santi Béjar
@ 2009-03-30 10:11 ` Santi Béjar
  2009-03-30 10:42   ` Michael J Gruber
  3 siblings, 1 reply; 17+ messages in thread
From: Santi Béjar @ 2009-03-30 10:11 UTC (permalink / raw)
  To: git

push.default was too generic, and also didn't specify if it was about
remote, refspec, branches, behaviour...

Signed-off-by: Santi Béjar <santi@agolina.net>
---
 Documentation/RelNotes-1.6.3.txt |    2 +-
 Documentation/config.txt         |    4 ++--
 builtin-push.c                   |   16 ++++++++--------
 cache.h                          |   14 +++++++-------
 config.c                         |   10 +++++-----
 environment.c                    |    2 +-
 6 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/Documentation/RelNotes-1.6.3.txt b/Documentation/RelNotes-1.6.3.txt
index f0a2e41..67b2b66 100644
--- a/Documentation/RelNotes-1.6.3.txt
+++ b/Documentation/RelNotes-1.6.3.txt
@@ -24,7 +24,7 @@ receive.denyDeleteCurrent in the receiving repository.
 
 When the user does not tell "git push" what to push, it has always
 pushed matching refs.  For some people it is unexpected, and a new
-configuration variable push.default has been introduced to allow
+configuration variable push.mode has been introduced to allow
 changing a different default behaviour.  To advertise the new feature,
 a big warning is issued if this is not configured and a git push without
 arguments is attempted.
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 38ab785..80bb3a6 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -480,7 +480,7 @@ branch.<name>.remote::
 branch.<name>.merge::
 	It defines, together with branch.<name>.remote, the upstream branch
 	for the given branch. It tells 'git-fetch'/'git-pull' which
-	branch to merge and can also afect 'git-push' (see push.default).
+	branch to merge and can also afect 'git-push' (see push.mode).
 	When in branch <name>, it tells 'git-fetch' the default
 	refspec to be marked for merging in FETCH_HEAD. The value is
 	handled like the remote part of a refspec, and must match a
@@ -1215,7 +1215,7 @@ pull.octopus::
 pull.twohead::
 	The default merge strategy to use when pulling a single branch.
 
-push.default::
+push.mode::
 	Defines the action git push should take if no refspec is given
 	on the command line, no refspec is configured in the remote, and
 	no refspec is implied by any of the options given on the command
diff --git a/builtin-push.c b/builtin-push.c
index 2eabcd3..c2c4de1 100644
--- a/builtin-push.c
+++ b/builtin-push.c
@@ -72,7 +72,7 @@ static const char *warn_unconfigured_push_msg[] = {
 	"not necessarily be what you want to happen.",
 	"",
 	"You can specify what action you want to take in this case, and",
-	"avoid seeing this message again, by configuring 'push.default' to:",
+	"avoid seeing this message again, by configuring 'push.mode' to:",
 	"  'nothing'  : Do not push anything",
 	"  'matching' : Push all matching branches (default)",
 	"  'tracking' : Push the current branch to whatever it is tracking",
@@ -89,26 +89,26 @@ static void warn_unconfigured_push(void)
 static void setup_default_push_refspecs(void)
 {
 	git_config(git_default_config, NULL);
-	switch (push_default) {
-	case PUSH_DEFAULT_UNSPECIFIED:
+	switch (push_mode) {
+	case PUSH_MODE_UNSPECIFIED:
 		warn_unconfigured_push();
 		/* fallthrough */
 
-	case PUSH_DEFAULT_MATCHING:
+	case PUSH_MODE_MATCHING:
 		add_refspec(":");
 		break;
 
-	case PUSH_DEFAULT_TRACKING:
+	case PUSH_MODE_TRACKING:
 		setup_push_tracking();
 		break;
 
-	case PUSH_DEFAULT_CURRENT:
+	case PUSH_MODE_CURRENT:
 		add_refspec("HEAD");
 		break;
 
-	case PUSH_DEFAULT_NOTHING:
+	case PUSH_MODE_NOTHING:
 		die("You didn't specify any refspecs to push, and "
-		    "push.default is \"nothing\".");
+		    "push.mode is \"nothing\".");
 		break;
 	}
 }
diff --git a/cache.h b/cache.h
index 641529b..1625965 100644
--- a/cache.h
+++ b/cache.h
@@ -542,17 +542,17 @@ enum rebase_setup_type {
 	AUTOREBASE_ALWAYS,
 };
 
-enum push_default_type {
-	PUSH_DEFAULT_UNSPECIFIED = -1,
-	PUSH_DEFAULT_NOTHING = 0,
-	PUSH_DEFAULT_MATCHING,
-	PUSH_DEFAULT_TRACKING,
-	PUSH_DEFAULT_CURRENT,
+enum push_mode_type {
+	PUSH_MODE_UNSPECIFIED = -1,
+	PUSH_MODE_NOTHING = 0,
+	PUSH_MODE_MATCHING,
+	PUSH_MODE_TRACKING,
+	PUSH_MODE_CURRENT,
 };
 
 extern enum branch_track git_branch_track;
 extern enum rebase_setup_type autorebase;
-extern enum push_default_type push_default;
+extern enum push_mode_type push_mode;
 
 #define GIT_REPO_VERSION 0
 extern int repository_format_version;
diff --git a/config.c b/config.c
index b76fe4c..ba02cfb 100644
--- a/config.c
+++ b/config.c
@@ -567,17 +567,17 @@ static int git_default_branch_config(const char *var, const char *value)
 
 static int git_default_push_config(const char *var, const char *value)
 {
-	if (!strcmp(var, "push.default")) {
+	if (!strcmp(var, "push.mode")) {
 		if (!value)
 			return config_error_nonbool(var);
 		else if (!strcmp(value, "nothing"))
-			push_default = PUSH_DEFAULT_NOTHING;
+			push_mode = PUSH_MODE_NOTHING;
 		else if (!strcmp(value, "matching"))
-			push_default = PUSH_DEFAULT_MATCHING;
+			push_mode = PUSH_MODE_MATCHING;
 		else if (!strcmp(value, "tracking"))
-			push_default = PUSH_DEFAULT_TRACKING;
+			push_mode = PUSH_MODE_TRACKING;
 		else if (!strcmp(value, "current"))
-			push_default = PUSH_DEFAULT_CURRENT;
+			push_mode = PUSH_MODE_CURRENT;
 		else {
 			error("Malformed value for %s: %s", var, value);
 			return error("Must be one of nothing, matching, "
diff --git a/environment.c b/environment.c
index 4696885..c925ea4 100644
--- a/environment.c
+++ b/environment.c
@@ -42,7 +42,7 @@ enum safe_crlf safe_crlf = SAFE_CRLF_WARN;
 unsigned whitespace_rule_cfg = WS_DEFAULT_RULE;
 enum branch_track git_branch_track = BRANCH_TRACK_REMOTE;
 enum rebase_setup_type autorebase = AUTOREBASE_NEVER;
-enum push_default_type push_default = PUSH_DEFAULT_UNSPECIFIED;
+enum push_mode_type push_mode = PUSH_MODE_UNSPECIFIED;
 
 /* Parallel index stat data preload? */
 int core_preload_index = 0;
-- 
1.6.1.258.g7ff14

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCHv2 3/4] Documentation: branch.*.merge can also afect 'git-push'
  2009-03-30 10:11 ` [PATCHv2 3/4] Documentation: branch.*.merge can also afect 'git-push' Santi Béjar
@ 2009-03-30 10:35   ` Michael J Gruber
  2009-03-30 16:47   ` Junio C Hamano
  1 sibling, 0 replies; 17+ messages in thread
From: Michael J Gruber @ 2009-03-30 10:35 UTC (permalink / raw)
  To: Santi Béjar; +Cc: git

Santi Béjar venit, vidit, dixit 30.03.2009 12:11:
> 
> Signed-off-by: Santi Béjar <santi@agolina.net>
> ---
>  Documentation/config.txt |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/Documentation/config.txt b/Documentation/config.txt
> index 7ae584f..38ab785 100644
> --- a/Documentation/config.txt
> +++ b/Documentation/config.txt
> @@ -480,7 +480,7 @@ branch.<name>.remote::
>  branch.<name>.merge::
>  	It defines, together with branch.<name>.remote, the upstream branch
>  	for the given branch. It tells 'git-fetch'/'git-pull' which
> -	branch to merge.
> +	branch to merge and can also afect 'git-push' (see push.default).

s/afect/affect/

>  	When in branch <name>, it tells 'git-fetch' the default
>  	refspec to be marked for merging in FETCH_HEAD. The value is
>  	handled like the remote part of a refspec, and must match a

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCHv2 4/4] Rename push.default to push.mode
  2009-03-30 10:11 ` [PATCHv2 4/4] Rename push.default to push.mode Santi Béjar
@ 2009-03-30 10:42   ` Michael J Gruber
  2009-03-30 12:37     ` Santi Béjar
  0 siblings, 1 reply; 17+ messages in thread
From: Michael J Gruber @ 2009-03-30 10:42 UTC (permalink / raw)
  To: Santi Béjar; +Cc: git

Santi Béjar venit, vidit, dixit 30.03.2009 12:11:
> push.default was too generic, and also didn't specify if it was about
> remote, refspec, branches, behaviour...

I guess we go for US spelling here, so it's "behavior" ;)

> 
> Signed-off-by: Santi Béjar <santi@agolina.net>
> ---
>  Documentation/RelNotes-1.6.3.txt |    2 +-
>  Documentation/config.txt         |    4 ++--
>  builtin-push.c                   |   16 ++++++++--------
>  cache.h                          |   14 +++++++-------
>  config.c                         |   10 +++++-----
>  environment.c                    |    2 +-
>  6 files changed, 24 insertions(+), 24 deletions(-)
> 
> diff --git a/Documentation/RelNotes-1.6.3.txt b/Documentation/RelNotes-1.6.3.txt
> index f0a2e41..67b2b66 100644
> --- a/Documentation/RelNotes-1.6.3.txt
> +++ b/Documentation/RelNotes-1.6.3.txt
> @@ -24,7 +24,7 @@ receive.denyDeleteCurrent in the receiving repository.
>  
>  When the user does not tell "git push" what to push, it has always
>  pushed matching refs.  For some people it is unexpected, and a new
> -configuration variable push.default has been introduced to allow
> +configuration variable push.mode has been introduced to allow
>  changing a different default behaviour.  To advertise the new feature,

Maybe time to change it here, too.

>  a big warning is issued if this is not configured and a git push without
>  arguments is attempted.
> diff --git a/Documentation/config.txt b/Documentation/config.txt
> index 38ab785..80bb3a6 100644
> --- a/Documentation/config.txt
> +++ b/Documentation/config.txt
> @@ -480,7 +480,7 @@ branch.<name>.remote::
>  branch.<name>.merge::
>  	It defines, together with branch.<name>.remote, the upstream branch
>  	for the given branch. It tells 'git-fetch'/'git-pull' which
> -	branch to merge and can also afect 'git-push' (see push.default).
> +	branch to merge and can also afect 'git-push' (see push.mode).

s/afect/affect/

>  	When in branch <name>, it tells 'git-fetch' the default
>  	refspec to be marked for merging in FETCH_HEAD. The value is
>  	handled like the remote part of a refspec, and must match a
> @@ -1215,7 +1215,7 @@ pull.octopus::
>  pull.twohead::
>  	The default merge strategy to use when pulling a single branch.
>  
> -push.default::
> +push.mode::
>  	Defines the action git push should take if no refspec is given
>  	on the command line, no refspec is configured in the remote, and
>  	no refspec is implied by any of the options given on the command
> diff --git a/builtin-push.c b/builtin-push.c
> index 2eabcd3..c2c4de1 100644
> --- a/builtin-push.c
> +++ b/builtin-push.c
> @@ -72,7 +72,7 @@ static const char *warn_unconfigured_push_msg[] = {
>  	"not necessarily be what you want to happen.",
>  	"",
>  	"You can specify what action you want to take in this case, and",
> -	"avoid seeing this message again, by configuring 'push.default' to:",
> +	"avoid seeing this message again, by configuring 'push.mode' to:",
>  	"  'nothing'  : Do not push anything",
>  	"  'matching' : Push all matching branches (default)",
>  	"  'tracking' : Push the current branch to whatever it is tracking",
> @@ -89,26 +89,26 @@ static void warn_unconfigured_push(void)
>  static void setup_default_push_refspecs(void)
>  {
>  	git_config(git_default_config, NULL);
> -	switch (push_default) {
> -	case PUSH_DEFAULT_UNSPECIFIED:
> +	switch (push_mode) {
> +	case PUSH_MODE_UNSPECIFIED:
>  		warn_unconfigured_push();
>  		/* fallthrough */
>  
> -	case PUSH_DEFAULT_MATCHING:
> +	case PUSH_MODE_MATCHING:
>  		add_refspec(":");
>  		break;
>  
> -	case PUSH_DEFAULT_TRACKING:
> +	case PUSH_MODE_TRACKING:
>  		setup_push_tracking();
>  		break;
>  
> -	case PUSH_DEFAULT_CURRENT:
> +	case PUSH_MODE_CURRENT:
>  		add_refspec("HEAD");
>  		break;
>  
> -	case PUSH_DEFAULT_NOTHING:
> +	case PUSH_MODE_NOTHING:
>  		die("You didn't specify any refspecs to push, and "
> -		    "push.default is \"nothing\".");
> +		    "push.mode is \"nothing\".");
>  		break;
>  	}
>  }
> diff --git a/cache.h b/cache.h
> index 641529b..1625965 100644
> --- a/cache.h
> +++ b/cache.h
> @@ -542,17 +542,17 @@ enum rebase_setup_type {
>  	AUTOREBASE_ALWAYS,
>  };
>  
> -enum push_default_type {
> -	PUSH_DEFAULT_UNSPECIFIED = -1,
> -	PUSH_DEFAULT_NOTHING = 0,
> -	PUSH_DEFAULT_MATCHING,
> -	PUSH_DEFAULT_TRACKING,
> -	PUSH_DEFAULT_CURRENT,
> +enum push_mode_type {
> +	PUSH_MODE_UNSPECIFIED = -1,
> +	PUSH_MODE_NOTHING = 0,
> +	PUSH_MODE_MATCHING,
> +	PUSH_MODE_TRACKING,
> +	PUSH_MODE_CURRENT,
>  };
>  
>  extern enum branch_track git_branch_track;
>  extern enum rebase_setup_type autorebase;
> -extern enum push_default_type push_default;
> +extern enum push_mode_type push_mode;
>  
>  #define GIT_REPO_VERSION 0
>  extern int repository_format_version;
> diff --git a/config.c b/config.c
> index b76fe4c..ba02cfb 100644
> --- a/config.c
> +++ b/config.c
> @@ -567,17 +567,17 @@ static int git_default_branch_config(const char *var, const char *value)
>  
>  static int git_default_push_config(const char *var, const char *value)
>  {
> -	if (!strcmp(var, "push.default")) {
> +	if (!strcmp(var, "push.mode")) {
>  		if (!value)
>  			return config_error_nonbool(var);
>  		else if (!strcmp(value, "nothing"))
> -			push_default = PUSH_DEFAULT_NOTHING;
> +			push_mode = PUSH_MODE_NOTHING;
>  		else if (!strcmp(value, "matching"))
> -			push_default = PUSH_DEFAULT_MATCHING;
> +			push_mode = PUSH_MODE_MATCHING;
>  		else if (!strcmp(value, "tracking"))
> -			push_default = PUSH_DEFAULT_TRACKING;
> +			push_mode = PUSH_MODE_TRACKING;
>  		else if (!strcmp(value, "current"))
> -			push_default = PUSH_DEFAULT_CURRENT;
> +			push_mode = PUSH_MODE_CURRENT;
>  		else {
>  			error("Malformed value for %s: %s", var, value);
>  			return error("Must be one of nothing, matching, "
> diff --git a/environment.c b/environment.c
> index 4696885..c925ea4 100644
> --- a/environment.c
> +++ b/environment.c
> @@ -42,7 +42,7 @@ enum safe_crlf safe_crlf = SAFE_CRLF_WARN;
>  unsigned whitespace_rule_cfg = WS_DEFAULT_RULE;
>  enum branch_track git_branch_track = BRANCH_TRACK_REMOTE;
>  enum rebase_setup_type autorebase = AUTOREBASE_NEVER;
> -enum push_default_type push_default = PUSH_DEFAULT_UNSPECIFIED;
> +enum push_mode_type push_mode = PUSH_MODE_UNSPECIFIED;
>  
>  /* Parallel index stat data preload? */
>  int core_preload_index = 0;

Your patches contain quoted-printable characters all over the place. Are
they not sent with git send-email?

Michael

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCHv2 4/4] Rename push.default to push.mode
  2009-03-30 10:42   ` Michael J Gruber
@ 2009-03-30 12:37     ` Santi Béjar
  2009-03-30 13:06       ` Michael J Gruber
  0 siblings, 1 reply; 17+ messages in thread
From: Santi Béjar @ 2009-03-30 12:37 UTC (permalink / raw)
  To: Michael J Gruber; +Cc: git

2009/3/30 Michael J Gruber <git@drmicha.warpmail.net>:
> Santi Béjar venit, vidit, dixit 30.03.2009 12:11:
>> push.default was too generic, and also didn't specify if it was about
>> remote, refspec, branches, behaviour...
>
> I guess we go for US spelling here, so it's "behavior" ;)

Ok.

>> diff --git a/Documentation/config.txt b/Documentation/config.txt
>> index 38ab785..80bb3a6 100644
>> --- a/Documentation/config.txt
>> +++ b/Documentation/config.txt
>> @@ -480,7 +480,7 @@ branch.<name>.remote::
>>  branch.<name>.merge::
>>       It defines, together with branch.<name>.remote, the upstream branch
>>       for the given branch. It tells 'git-fetch'/'git-pull' which
>> -     branch to merge and can also afect 'git-push' (see push.default).
>> +     branch to merge and can also afect 'git-push' (see push.mode).
>
> s/afect/affect/
>

OK

>
> Your patches contain quoted-printable characters all over the place.

I don't see the quoted-printable characters, I see them in utf-8 and 8bit.

Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

Maybe some server in between is recoding it.

> Are
> they not sent with git send-email?

They are send with git send-email and msmtp.

Santi

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCHv2 4/4] Rename push.default to push.mode
  2009-03-30 12:37     ` Santi Béjar
@ 2009-03-30 13:06       ` Michael J Gruber
  2009-03-30 13:45         ` Jeff King
  0 siblings, 1 reply; 17+ messages in thread
From: Michael J Gruber @ 2009-03-30 13:06 UTC (permalink / raw)
  To: Santi Béjar; +Cc: Michael J Gruber, git

Santi Béjar venit, vidit, dixit 30.03.2009 14:37:
> 2009/3/30 Michael J Gruber <git@drmicha.warpmail.net>:
>> Santi Béjar venit, vidit, dixit 30.03.2009 12:11:
>>> push.default was too generic, and also didn't specify if it was about
>>> remote, refspec, branches, behaviour...
>>
>> I guess we go for US spelling here, so it's "behavior" ;)
> 
> Ok.
> 
>>> diff --git a/Documentation/config.txt b/Documentation/config.txt
>>> index 38ab785..80bb3a6 100644
>>> --- a/Documentation/config.txt
>>> +++ b/Documentation/config.txt
>>> @@ -480,7 +480,7 @@ branch.<name>.remote::
>>>  branch.<name>.merge::
>>>       It defines, together with branch.<name>.remote, the upstream branch
>>>       for the given branch. It tells 'git-fetch'/'git-pull' which
>>> -     branch to merge and can also afect 'git-push' (see push.default).
>>> +     branch to merge and can also afect 'git-push' (see push.mode).
>>
>> s/afect/affect/
>>
> 
> OK
> 
>>
>> Your patches contain quoted-printable characters all over the place.
> 
> I don't see the quoted-printable characters, I see them in utf-8 and 8bit.
> 
> Content-Type: text/plain; charset=utf-8
> Content-Transfer-Encoding: 8bit
> 
> Maybe some server in between is recoding it.
> 
>> Are
>> they not sent with git send-email?
> 
> They are send with git send-email and msmtp.
> 
> Santi

That's weird. I read through gmane/nntp, but others' posts are fine.
Yours have

Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: QUOTED-PRINTABLE

But as long as Junio gets them unmangled I don't mind.

OK, I checked the raw mail at marc. It's fine. So I guess it's a gmane
thing (or tb)... Sorry I bothered you.

Michael

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCHv2 4/4] Rename push.default to push.mode
  2009-03-30 13:06       ` Michael J Gruber
@ 2009-03-30 13:45         ` Jeff King
  2009-03-30 14:47           ` Michael J Gruber
  0 siblings, 1 reply; 17+ messages in thread
From: Jeff King @ 2009-03-30 13:45 UTC (permalink / raw)
  To: Michael J Gruber; +Cc: Santi Béjar, git

On Mon, Mar 30, 2009 at 03:06:00PM +0200, Michael J Gruber wrote:

> > I don't see the quoted-printable characters, I see them in utf-8 and 8bit.
> > 
> > Content-Type: text/plain; charset=utf-8
> > Content-Transfer-Encoding: 8bit
> > 
> > Maybe some server in between is recoding it.
> 
> That's weird. I read through gmane/nntp, but others' posts are fine.
> Yours have
> 
> Content-Type: text/plain; charset=utf-8
> Content-Transfer-Encoding: QUOTED-PRINTABLE

If a subscriber's mailserver does not support the 8BITMIME SMTP
extension, then vger will (correctly) encode an 8bit message as QP.
Gmane's mailservers do not seem to support 8BITMIME.

You see it only with Santi's message because most messages are already
7bit clean; however, the accent in his name requires git to mark it as
8-bit.

-Peff

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCHv2 4/4] Rename push.default to push.mode
  2009-03-30 13:45         ` Jeff King
@ 2009-03-30 14:47           ` Michael J Gruber
  2009-03-30 18:02             ` Jeff King
  0 siblings, 1 reply; 17+ messages in thread
From: Michael J Gruber @ 2009-03-30 14:47 UTC (permalink / raw)
  To: Jeff King; +Cc: Santi Béjar, git

Jeff King venit, vidit, dixit 30.03.2009 15:45:
> On Mon, Mar 30, 2009 at 03:06:00PM +0200, Michael J Gruber wrote:
> 
>>> I don't see the quoted-printable characters, I see them in utf-8 and 8bit.
>>>
>>> Content-Type: text/plain; charset=utf-8
>>> Content-Transfer-Encoding: 8bit
>>>
>>> Maybe some server in between is recoding it.
>>
>> That's weird. I read through gmane/nntp, but others' posts are fine.
>> Yours have
>>
>> Content-Type: text/plain; charset=utf-8
>> Content-Transfer-Encoding: QUOTED-PRINTABLE
> 
> If a subscriber's mailserver does not support the 8BITMIME SMTP
> extension, then vger will (correctly) encode an 8bit message as QP.
> Gmane's mailservers do not seem to support 8BITMIME.
> 
> You see it only with Santi's message because most messages are already
> 7bit clean; however, the accent in his name requires git to mark it as
> 8-bit.

Thanks for the explanation! I rechecked, and for sure it also happened
with patches from Tor Arne Vestbø and Nguyễn Thái Ngọc Duy.
Again I feel blessed by my umlautlessness... and challenged by gmane.
About time to ditch it for reading patches also, or at least to be aware
of it when saving patches.

Michael

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCHv2 3/4] Documentation: branch.*.merge can also afect 'git-push'
  2009-03-30 10:11 ` [PATCHv2 3/4] Documentation: branch.*.merge can also afect 'git-push' Santi Béjar
  2009-03-30 10:35   ` Michael J Gruber
@ 2009-03-30 16:47   ` Junio C Hamano
  2009-03-30 22:06     ` Santi Béjar
  1 sibling, 1 reply; 17+ messages in thread
From: Junio C Hamano @ 2009-03-30 16:47 UTC (permalink / raw)
  To: Santi Béjar; +Cc: git

Santi Béjar <santi@agolina.net> writes:

> Signed-off-by: Santi Béjar <santi@agolina.net>
> ---
>  Documentation/config.txt |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/Documentation/config.txt b/Documentation/config.txt
> index 7ae584f..38ab785 100644
> --- a/Documentation/config.txt
> +++ b/Documentation/config.txt
> @@ -480,7 +480,7 @@ branch.<name>.remote::
>  branch.<name>.merge::
>  	It defines, together with branch.<name>.remote, the upstream branch
>  	for the given branch. It tells 'git-fetch'/'git-pull' which
> -	branch to merge.
> +	branch to merge and can also afect 'git-push' (see push.default).
>  	When in branch <name>, it tells 'git-fetch' the default
>  	refspec to be marked for merging in FETCH_HEAD. The value is
>  	handled like the remote part of a refspec, and must match a

I'll take [1/4] and [2/4] with minor rewording, and I think [4/4] is not
necessary (push.default is clear enough---and defaultMode won't make it
any clearer to the first time readers anyway as it is unspecified what
kind of "mode" it is talking about).

I do not understand this [3/4].  I did look at push.default but it is
unclear how this variable is involved.

Perhaps it is because the word "tracking" in the description "push the
current branch to the branch it is tracking" is used without explaination.
I think the author meant to say if your local branch frotz by default
merges changes made to the branch nitfol of the remote repository, "frotz
tracks nitfol", but the use of the word "track" for that meaning appears
nowhere in Documentation/glossary-content.txt

When you have:

        [branch "frotz"]
                remote = xyzzy
                merge = nitfol
        [remote "xyzzy"]
                url = ...
                fetch = refs/heads/*:refs/remotes/xyzzy/*

we can learn from the glossary the following:

 * refs/remotes/xyzzy/nitfol is a (remote) tracking branch and is used to
   follow changes made on "nitfol" branch in another repository "xyzzy".

 * refs/heads/*:refs/remotes/xyzzy/* is a refspec.  It shows refs under
   refs/heads/ (aka "local branches") of the "xyzzy" repository are copied
   to our refs/remotes/xyzzy/ hierarchy.

There is no word defined to describe what "nitfol" is to "frotz".  It is
what "frotz" merges from.  So perhaps the description of push.default
should say that, instead of using the word "track" in a confusing way to
describe unrelated concept.  Saying "merge" might confuse people who want
to use "branch.<name>.rebase", so it might be a good idea to say:

	frotz updates with nitfol

To "track" is pretty much about one-way communication.  You track the
other guy, but you do not have to (and often you cannot) update the
upstream with what you do.  branch.<name>.merge may have been "tracking"
in that sense, but with the push.default set to tracking, suddenly the
communication becomes bidirectional and it is not about tracking anymore.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCHv2 4/4] Rename push.default to push.mode
  2009-03-30 14:47           ` Michael J Gruber
@ 2009-03-30 18:02             ` Jeff King
  2009-03-31 12:55               ` Michael J Gruber
  0 siblings, 1 reply; 17+ messages in thread
From: Jeff King @ 2009-03-30 18:02 UTC (permalink / raw)
  To: Michael J Gruber; +Cc: Santi Béjar, git

On Mon, Mar 30, 2009 at 04:47:20PM +0200, Michael J Gruber wrote:

> Thanks for the explanation! I rechecked, and for sure it also happened
> with patches from Tor Arne Vestbø and Nguyễn Thái Ngọc Duy.
> Again I feel blessed by my umlautlessness... and challenged by gmane.
> About time to ditch it for reading patches also, or at least to be aware
> of it when saving patches.

The message gmane passes out has the content-transfer-encoding set
properly. Your newsreader should properly un-QP it, or if it has an
option to save it directly (encoding and all), then "git am" will un-QP
it. If you were to "git apply" it directly, that would break, though
(and it is user error). If your newsreader saves the QP text without the
matching header, then that would also break (and your newsreader is
broken).

Just curious how you are seeing the breakage (because I want to make
sure there is no git bug).

-Peff

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCHv2 3/4] Documentation: branch.*.merge can also afect  'git-push'
  2009-03-30 16:47   ` Junio C Hamano
@ 2009-03-30 22:06     ` Santi Béjar
  2009-04-02  6:08       ` Junio C Hamano
  0 siblings, 1 reply; 17+ messages in thread
From: Santi Béjar @ 2009-03-30 22:06 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

2009/3/30 Junio C Hamano <gitster@pobox.com>:
> I'll take [1/4] and [2/4] with minor rewording, and I think [4/4] is not
> necessary (push.default is clear enough---and defaultMode won't make it
> any clearer to the first time readers anyway as it is unspecified what
> kind of "mode" it is talking about).

At least to me, mode in the context of 'push' suggest behavior. But
maybe only for second time readers...

>
> I do not understand this [3/4].  I did look at push.default but it is
> unclear how this variable is involved.
>
> Perhaps it is because the word "tracking" in the description "push the
> current branch to the branch it is tracking" is used without explaination.

Maybe the push.default description needs some enhancements, but this
[3/4] is true.

> I think the author meant to say if your local branch frotz by default
> merges changes made to the branch nitfol of the remote repository, "frotz
> tracks nitfol", but the use of the word "track" for that meaning appears
> nowhere in Documentation/glossary-content.txt

So we can define:

push.default = "tracking" = "push the current branch to its upstream branch"

The "upstream branch" is defined in branch.name.merge and could also
be added to glossary-content.

Santi

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCHv2 4/4] Rename push.default to push.mode
  2009-03-30 18:02             ` Jeff King
@ 2009-03-31 12:55               ` Michael J Gruber
  2009-03-31 13:08                 ` Jeff King
  0 siblings, 1 reply; 17+ messages in thread
From: Michael J Gruber @ 2009-03-31 12:55 UTC (permalink / raw)
  To: Jeff King; +Cc: Santi Béjar, git

Jeff King venit, vidit, dixit 30.03.2009 20:02:
> On Mon, Mar 30, 2009 at 04:47:20PM +0200, Michael J Gruber wrote:
> 
>> Thanks for the explanation! I rechecked, and for sure it also happened
>> with patches from Tor Arne Vestbø and Nguyễn Thái Ngọc Duy.
>> Again I feel blessed by my umlautlessness... and challenged by gmane.
>> About time to ditch it for reading patches also, or at least to be aware
>> of it when saving patches.
> 
> The message gmane passes out has the content-transfer-encoding set
> properly. Your newsreader should properly un-QP it, or if it has an
> option to save it directly (encoding and all), then "git am" will un-QP
> it. If you were to "git apply" it directly, that would break, though
> (and it is user error). If your newsreader saves the QP text without the
> matching header, then that would also break (and your newsreader is
> broken).
> 
> Just curious how you are seeing the breakage (because I want to make
> sure there is no git bug).
> 
> -Peff

I haven't seen any breakage. I just noticed a different font being used
for Santi's posts (due to different character encoding, with a different
font preset in TB) and looked at the message source, where I saw =20 and
such all over the place (message display is fine). When saving from TB
the QP is undone. It just made me feel uneasy because of our recent
discussion regarding format-flowed and patch submission. I know ff \ne
qp, but still I thought git-{send-email,apply} would prefer straight ascii.

Michael

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCHv2 4/4] Rename push.default to push.mode
  2009-03-31 12:55               ` Michael J Gruber
@ 2009-03-31 13:08                 ` Jeff King
  0 siblings, 0 replies; 17+ messages in thread
From: Jeff King @ 2009-03-31 13:08 UTC (permalink / raw)
  To: Michael J Gruber; +Cc: Santi Béjar, git

On Tue, Mar 31, 2009 at 02:55:12PM +0200, Michael J Gruber wrote:

> I haven't seen any breakage. I just noticed a different font being used
> for Santi's posts (due to different character encoding, with a different
> font preset in TB) and looked at the message source, where I saw =20 and
> such all over the place (message display is fine). When saving from TB
> the QP is undone. It just made me feel uneasy because of our recent
> discussion regarding format-flowed and patch submission. I know ff \ne
> qp, but still I thought git-{send-email,apply} would prefer straight ascii.

Ah, OK. I think everything is working as expected, then. Thanks for the
clarification.

-Peff

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCHv2 3/4] Documentation: branch.*.merge can also afect  'git-push'
  2009-03-30 22:06     ` Santi Béjar
@ 2009-04-02  6:08       ` Junio C Hamano
  0 siblings, 0 replies; 17+ messages in thread
From: Junio C Hamano @ 2009-04-02  6:08 UTC (permalink / raw)
  To: Santi Béjar; +Cc: git

Santi Béjar <santi@agolina.net> writes:

> 2009/3/30 Junio C Hamano <gitster@pobox.com>:
> ...
> Maybe the push.default description needs some enhancements, but this
> [3/4] is true.
>
>> I think the author meant to say if your local branch frotz by default
>> merges changes made to the branch nitfol of the remote repository, "frotz
>> tracks nitfol", but the use of the word "track" for that meaning appears
>> nowhere in Documentation/glossary-content.txt
>
> So we can define:
>
> push.default = "tracking" = "push the current branch to its upstream branch"
>
> The "upstream branch" is defined in branch.name.merge and could also
> be added to glossary-content.

Sounds like a good plan.  Please make it so.

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2009-04-02  6:10 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-30 10:11 [PATCHv2 0/4] push.default and branch.<name>.{remote,merge} changes Santi Béjar
2009-03-30 10:11 ` [PATCHv2 1/4] Documentation: enhance branch.<name>.{remote,merge} Santi Béjar
2009-03-30 10:11 ` [PATCHv2 2/4] Documentation: push.default applies to all remotes Santi Béjar
2009-03-30 10:11 ` [PATCHv2 3/4] Documentation: branch.*.merge can also afect 'git-push' Santi Béjar
2009-03-30 10:35   ` Michael J Gruber
2009-03-30 16:47   ` Junio C Hamano
2009-03-30 22:06     ` Santi Béjar
2009-04-02  6:08       ` Junio C Hamano
2009-03-30 10:11 ` [PATCHv2 4/4] Rename push.default to push.mode Santi Béjar
2009-03-30 10:42   ` Michael J Gruber
2009-03-30 12:37     ` Santi Béjar
2009-03-30 13:06       ` Michael J Gruber
2009-03-30 13:45         ` Jeff King
2009-03-30 14:47           ` Michael J Gruber
2009-03-30 18:02             ` Jeff King
2009-03-31 12:55               ` Michael J Gruber
2009-03-31 13:08                 ` Jeff King

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.