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

Re: cannot handle more than 29 refs

From
Junio C Hamano <junkio@cox.net>
Date
Dec 27, 2005, 19:46 UTC
Message-ID
<7vvexa9vbu.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.64.0512271113290.14098@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
> Junio - I think we should make "git pull" refuse to merge more than one 
> head. If somebody wants to do an octopus merge, they can use "git merge" 
> instead. Hmm?

That would lose the autogenerated merge message. I can be talked into making it 'core.expert = true' only, though.

More troubling is 'git pull --tags' should *not* even try to use them for merging, so if it does that that needs to be fixed.

As I recall how I did (wanted to do) it, the default rule for 'pull' is:

 - if you have explicit head names on the command line (--tags
   does not count -- you are not stating name explicitly),
   all of them are merged into an octopus;
 - otherwise if you used remotes/ shorthand the head(s) on the
   first Pull: line;
 - otherwise HEAD;
And the code _is_ broken.  Here is a proposed fix.

-- >8 -- [PATCH] Do not mark tags fetched via --tags flag as mergeable

Otherwise "git pull --tags" would mistakenly try to merge all of them, which is never what the user wants.

Signed-off-by: Junio C Hamano <junkio@cox.net>
---
diff --git a/git-fetch.sh b/git-fetch.sh
index 767ca61..125bcea 100755
--- a/git-fetch.sh
+++ b/git-fetch.sh
@@ -192,7 +192,7 @@ then
 		sed -e '
 			/\^/d
 			s/^[^	]*	//
-			s/.*/&:&/')
+			s/.*/.&:&/')
 	if test "$#" -gt 1
 	then
 		# remote URL plus explicit refspecs; we need to merge them.
Previous: Linus TorvaldsNext: Jon Nelson
Message 4 of 5 in “cannot handle more than 29 refs”
  1. Jon NelsonDec 27, 2005
  2. Junio C HamanoDec 27, 2005
  3. Linus TorvaldsDec 27, 2005
  4. Junio C HamanoDec 27, 2005
  5. Jon NelsonDec 27, 2005

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.