git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] builtin-push: --all and --tags _are_ explicit refspecs

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
May 4, 2006, 21:18 UTC
Message-ID
<Pine.LNX.4.63.0605042317560.11836@wbgn013.biozentrum.uni-wuerzburg.de>

... 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>
---
 builtin-push.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
42859edd0156479786e5bc4184e462a0307a67eb
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 *r
 {
 	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 
 	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;
-- 
1.3.2.gec86-dirty
Message 1 of 1 in “builtin-push: --all and --tags _are_ explicit refspecs”
  1. builtin-push: --all and --tags _are_ explicit refspecsJohannes Schindelin, May 4, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.