From: Michael J Gruber <michaeljgruber+gmane@fastmail.fm>
To: git@vger.kernel.org
Subject: Re: git-fetch remote tag to local branch fails
Date: Tue, 24 Jun 2008 16:57:02 +0200 [thread overview]
Message-ID: <g3r1vv$7dr$1@ger.gmane.org> (raw)
In-Reply-To: <33f4f4d70806240701o1c00cef2g688a188970964b0f@mail.gmail.com>
Klas Lindberg venit, vidit, dixit 24.06.2008 16:01:
> Hello
>
>> git tag -l
> foo_tag
> test_tag
>
>> git branch -a
>>
>
> At this point, I can create the branch "b" from "foo_tag", so the
> fetch did get me a remote tag. It just didn't update a local branch
> with the contents (or create a new one).
>
> Something that also confuses me is that if branch "b" already exists, then
>
>> git-pull bogustree refs/tags/foo_tag:refs/heads/b
>
> actually does update branch "b". I find the behaviour quite inconsistent.
You tell git to fetch everything up to the tag you specify, to store
those refs into branch b, and then to merge into the current branch.
This is what git did (assuming you see the merge in the current branch;
if it's b then it has been fast forwarded already).
> Unfortunately it isn't a solution for me to fetch tags and then create
> branches from the tags. I need to be able to update existing branches,
> and I have to do that without first making such a branch the current
> branch.
If I try what you described (using git 1.5.6) in a fresh repo (with one
empty commit) I get:
git fetch ../fromrepo refs/tags/testtag:refs/heads/newbranch
warning: no common commits
remote: Counting objects: 18, done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 18 (delta 9), reused 0 (delta 0)
Unpacking objects: 100% (18/18), done.
From ../fromrepo
* [new branch] testtag -> newbranch
* [new tag] testtag -> testtag
I see a new branch, disconnected from master (no common commits), and a
new tag pointing to the head of newbranch. All is well here. Maybe you
can set-up a minimal example or share a repo which exposes your problem?
Michael
prev parent reply other threads:[~2008-06-24 14:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='g3r1vv$7dr$1@ger.gmane.org' \
--to=michaeljgruber+gmane@fastmail.fm \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).