Re: cannot handle more than 29 refs

From: Junio C Hamano <junkio@cox.net>
Date: 2005-12-28 06:46:45
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.


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Wed Dec 28 06:47:28 2005

This archive was generated by hypermail 2.1.8 : 2005-12-28 06:47:36 EST