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>
Johannes Schindelin committed
May 4, 2006 at 23:18 UTC
5edbcd8d778d81254d2c8a4229c76c6fa7880407
1 file changed
+2
-2
builtin-push.c
+2
-2
@@ -72,7 +72,7 @@ static int get_remotes_uri(const char *repo, const char *uri[MAX_URI])
72
{
73
int n = 0;
74
FILE *f = fopen(git_path("remotes/%s", repo), "r");
75
- int has_explicit_refspec = refspec_nr;
75
+ int has_explicit_refspec = refspec_nr || all || tags;
76
77
if (!f)
78
return -1;
@@ -144,7 +144,7 @@ static int get_config_remotes_uri(const char *repo, const char *uri[MAX_URI])
144
config_repo = repo;
145
config_current_uri = 0;
146
config_uri = uri;
147
- config_get_refspecs = !refspec_nr;
147
+ config_get_refspecs = !(refspec_nr || all || tags);
148
149
git_config(get_remote_config);
150
return config_current_uri;