提交 5edbcd8d 编写于 作者: J Johannes Schindelin 提交者: Junio C Hamano

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: NJohannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 5892fc65
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册