With the next patch, the default refspec for push will depend on whether --current is being used. Revert part of bba0fd2 (push: do not give big warning when no preference is configured, 2009-07-18) to simplify the next patch. Signed-off-by: Paolo Bonzini <bonzini@xxxxxxx> --- builtin-push.c | 1 + cache.h | 1 + environment.c | 2 +- 3 files changed, 3 insertions(+), 1 deletions(-) diff --git a/builtin-push.c b/builtin-push.c index 1d92e22..e678a9d 100644 --- a/builtin-push.c +++ b/builtin-push.c @@ -69,6 +69,7 @@ static void setup_default_push_refspecs(void) git_config(git_default_config, NULL); switch (push_default) { default: + case PUSH_DEFAULT_UNSPECIFIED: case PUSH_DEFAULT_MATCHING: add_refspec(":"); break; diff --git a/cache.h b/cache.h index c72f125..f1e5ede 100644 --- a/cache.h +++ b/cache.h @@ -543,6 +543,7 @@ enum rebase_setup_type { }; enum push_default_type { + PUSH_DEFAULT_UNSPECIFIED = -1, PUSH_DEFAULT_NOTHING = 0, PUSH_DEFAULT_MATCHING, PUSH_DEFAULT_TRACKING, diff --git a/environment.c b/environment.c index 720f26b..801a005 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_MATCHING; +enum push_default_type push_default = PUSH_DEFAULT_UNSPECIFIED; #ifndef OBJECT_CREATION_MODE #define OBJECT_CREATION_MODE OBJECT_CREATION_USES_HARDLINKS #endif -- 1.6.4.rc1.10.g26dbf.dirty -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html