diff --git a/builtin-push.c b/builtin-push.c
index 06d06ff310da61d71cc11bf0ac9245228a6cc10b..e530022824c13138925152de716beb3573714f40 100644 (file)
--- a/builtin-push.c
+++ b/builtin-push.c
{
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;
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;