git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-fetch remote tag to local branch fails
@ 2008-06-24 12:17 Klas Lindberg
  2008-06-24 13:38 ` Santi Béjar
  0 siblings, 1 reply; 10+ messages in thread
From: Klas Lindberg @ 2008-06-24 12:17 UTC (permalink / raw)
  To: git

Hi

I have a repository "bogustree" that contains tags "test_tag" and
"foo_tag" (both on the same branch, with "test_tag" pointing to an
older commit).
I also have repository "R", which contains "test_tag" from "bogustree"
and a branch "b" created from "test_tag". The active branch in R is
"master".

Now I want to do the following from R:

git-fetch bogustree refs/tags/foo_tag:refs/heads/b

but this fails with the message given below. The interesting part is
that git-fetch tries to write a "non-commit object" and indeed I have
no idea what this thing is (the commit pointed to by "foo_tag" has
commit ID cab0a25388f1884a1ab16bd0d66f877c0b36f1d5). Another
interesting detail is that the command fails and then continues
anyway. That seems wrong in itself.

# remote: Counting objects: 6, done.
# remote: Compressing objects: 100% (2/2), done.
# remote: Total 4 (delta 0), reused 0 (delta 0)
# Unpacking objects: 100% (4/4), done.
# error: Trying to write non-commit object
5f61233bc5dad0f3e25ecea65457f5bb528174d2 to branch refs/heads/B
# From /home/qliklas/bogustree/b/b
#    72f0622..5f61233  foo_tag    -> b
# From /home/qliklas/bogustree/b/b
#  * [new tag]         foo_tag    -> foo_tag
#  * [new tag]         test_tag   -> test_tag

Why can't I fetch like this? The manual page for git-fetch says that

       <refspec>
              The canonical format of a <refspec> parameter is +?<src>:<dst>;
              that is, an optional plus +, followed by the source ref,
              followed by a colon :, followed by the destination ref.

              The remote ref that matches <src> is fetched, and if <dst> is
              not empty string, the local ref that matches it is fast
              forwarded using <src>. Again, if the optional plus + is used,
              the local ref is updated even if it does not result in a fast
              forward update.

so I think it should be OK?

BR / Klas

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-06-25  9:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-24 12:17 git-fetch remote tag to local branch fails Klas Lindberg
2008-06-24 13:38 ` Santi Béjar
2008-06-24 14:01   ` Klas Lindberg
2008-06-24 14:27     ` Santi Béjar
2008-06-24 15:31       ` Klas Lindberg
2008-06-24 15:36         ` Klas Lindberg
2008-06-24 16:11         ` Santi Béjar
2008-06-25  8:50           ` Klas Lindberg
2008-06-25  9:10             ` Jakub Narebski
2008-06-24 14:57     ` Michael J Gruber

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).