* cannot handle more than 29 refs
@ 2005-12-27 14:43 Jon Nelson
2005-12-27 16:48 ` Junio C Hamano
2005-12-27 19:18 ` Linus Torvalds
0 siblings, 2 replies; 5+ messages in thread
From: Jon Nelson @ 2005-12-27 14:43 UTC (permalink / raw)
To: git
I get this message whenever I use --tags with git-pull with certain
repositories. The git repository is one, and so is my local repository.
I googled and got nothing. I grepped the git archive and got only
show-branch.c. Can this be safely ignored? Is it a known shortcoming,
or something else entirely?
--
Jon Nelson <jnelson-git@jamponi.net>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: cannot handle more than 29 refs
2005-12-27 14:43 cannot handle more than 29 refs Jon Nelson
@ 2005-12-27 16:48 ` Junio C Hamano
2005-12-27 19:18 ` Linus Torvalds
1 sibling, 0 replies; 5+ messages in thread
From: Junio C Hamano @ 2005-12-27 16:48 UTC (permalink / raw)
To: Jon Nelson; +Cc: git
Known shortcoming.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: cannot handle more than 29 refs
2005-12-27 14:43 cannot handle more than 29 refs Jon Nelson
2005-12-27 16:48 ` Junio C Hamano
@ 2005-12-27 19:18 ` Linus Torvalds
2005-12-27 19:46 ` Junio C Hamano
2005-12-27 20:49 ` Jon Nelson
1 sibling, 2 replies; 5+ messages in thread
From: Linus Torvalds @ 2005-12-27 19:18 UTC (permalink / raw)
To: Jon Nelson; +Cc: git
On Tue, 27 Dec 2005, Jon Nelson wrote:
>
> I get this message whenever I use --tags with git-pull with certain
> repositories.
You shouldn't "pull" tags. You should just "fetch" them.
The error message comes from the fact that the pull is a "fetch + merge",
and the merge logic tries to figure out what the common parent is with
"git-show-branch". And the common parent finding is limited to 29 commits.
(Which is a very reasonable limit: the normal case is 2, and doing an
octopus-merge with more than four or five parents is already insane. Much
less 30 parents).
> The git repository is one, and so is my local repository.
> I googled and got nothing. I grepped the git archive and got only
> show-branch.c. Can this be safely ignored? Is it a known shortcoming,
> or something else entirely?
Well, it's a known shortcoming, but it really ends up being a sign of you
doing the wrong thing and trying to merge all the tags together. The merge
would almost certainly fail, btw, regardless of anything else.
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?
Linus
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: cannot handle more than 29 refs
2005-12-27 19:18 ` Linus Torvalds
@ 2005-12-27 19:46 ` Junio C Hamano
2005-12-27 20:49 ` Jon Nelson
1 sibling, 0 replies; 5+ messages in thread
From: Junio C Hamano @ 2005-12-27 19:46 UTC (permalink / raw)
To: Linus Torvalds; +Cc: git
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.
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: cannot handle more than 29 refs
2005-12-27 19:18 ` Linus Torvalds
2005-12-27 19:46 ` Junio C Hamano
@ 2005-12-27 20:49 ` Jon Nelson
1 sibling, 0 replies; 5+ messages in thread
From: Jon Nelson @ 2005-12-27 20:49 UTC (permalink / raw)
Cc: git
On Tue, 27 Dec 2005, Linus Torvalds wrote:
>
>
> On Tue, 27 Dec 2005, Jon Nelson wrote:
> >
> > I get this message whenever I use --tags with git-pull with certain
> > repositories.
>
> You shouldn't "pull" tags. You should just "fetch" them.
>
> The error message comes from the fact that the pull is a "fetch + merge",
> and the merge logic tries to figure out what the common parent is with
> "git-show-branch". And the common parent finding is limited to 29 commits.
>
> (Which is a very reasonable limit: the normal case is 2, and doing an
> octopus-merge with more than four or five parents is already insane. Much
> less 30 parents).
^^^ Aha! I think I understand what's going on here - and you are right,
I *don't* want to merge from all of those tags, I just want the content,
so fetch is what I should be doing. Thanks!
--
Jon Nelson <jnelson-git@jamponi.net>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-12-27 20:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-27 14:43 cannot handle more than 29 refs Jon Nelson
2005-12-27 16:48 ` Junio C Hamano
2005-12-27 19:18 ` Linus Torvalds
2005-12-27 19:46 ` Junio C Hamano
2005-12-27 20:49 ` Jon Nelson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).