Skip to content

Commit

Permalink
builtin-push: --all and --tags _are_ explicit refspecs
Browse files Browse the repository at this point in the history
... 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>
  • Loading branch information
dscho authored and Junio C Hamano committed May 5, 2006
1 parent 5892fc6 commit 5edbcd8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions builtin-push.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 5edbcd8

Please sign in to comment.