summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2006-05-04 21:18:14 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-05-05 00:28:14 (GMT)
commit5edbcd8d778d81254d2c8a4229c76c6fa7880407 (patch)
tree9508a878765f522dcc40d87e01676806ebf25aec
parent5892fc6504dd23d7cf9415afb13bae8a61d6c70e (diff)
downloadgit-5edbcd8d778d81254d2c8a4229c76c6fa7880407.zip
git-5edbcd8d778d81254d2c8a4229c76c6fa7880407.tar.gz
git-5edbcd8d778d81254d2c8a4229c76c6fa7880407.tar.bz2
builtin-push: --all and --tags _are_ explicit refspecs
... so do not get refspecs from remotes/* or the config if one of them was specified. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r--builtin-push.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin-push.c b/builtin-push.c
index 06d06ff..e530022 100644
--- a/builtin-push.c
+++ b/builtin-push.c
@@ -72,7 +72,7 @@ static int get_remotes_uri(const char *repo, const char *uri[MAX_URI])
{
int n = 0;
FILE *f = fopen(git_path("remotes/%s", repo), "r");
- int has_explicit_refspec = refspec_nr;
+ int has_explicit_refspec = refspec_nr || all || tags;
if (!f)
return -1;
@@ -144,7 +144,7 @@ static int get_config_remotes_uri(const char *repo, const char *uri[MAX_URI])
config_repo = repo;
config_current_uri = 0;
config_uri = uri;
- config_get_refspecs = !refspec_nr;
+ config_get_refspecs = !(refspec_nr || all || tags);
git_config(get_remote_config);
return config_current_uri;