# [EGIT] Checking out signed tags fails

3 messages from 2008-09-16 to 2008-09-20. Participants: Jonas Flodén, Jonas Fonseca, Shawn O. Pearce.
Thread: https://gitlist.dev/t/15549

## Jonas Flodén, 2008-09-16 12:58

Subject: [EGIT] Checking out signed tags fails
Message-ID: <gaoaif$2up$1@ger.gmane.org>
URL: https://gitlist.dev/e/gaoaif%242up%241%40ger.gmane.org

```
When trying to check-out a signed tag I get the following Error:
Unable to switch branches

Reason:
  Mapping commit: refs/tags/v1.3.1.1

And in details:
Object XXX is not a commit.

The object ID shown is actually the id for the tag object and not the
tagged commit.

This was tested with the latest master. It seemed commit 1f460e2 (Tests
and fixes for dereferencing tags in Repository.resolve(), 2008-09-12)
would fix it, but it didn't.

Thanks,

Jonas

```

## Jonas Fonseca, 2008-09-16 18:48

Subject: Re: [EGIT] Checking out signed tags fails
Message-ID: <2c6b72b30809161148p2b4ce08fh32ff5717ca85e773@mail.gmail.com>
URL: https://gitlist.dev/e/2c6b72b30809161148p2b4ce08fh32ff5717ca85e773%40mail.gmail.com
In-Reply-To: <gaoaif$2up$1@ger.gmane.org>

```
On Tue, Sep 16, 2008 at 14:58, Jonas Flodén <jonas.floden@gmail.com> wrote:
> When trying to check-out a signed tag I get the following Error:
> Unable to switch branches
>
> Reason:
>  Mapping commit: refs/tags/v1.3.1.1
>
> And in details:
> Object XXX is not a commit.
>
> The object ID shown is actually the id for the tag object and not the
> tagged commit.
>
> This was tested with the latest master. It seemed commit 1f460e2 (Tests
> and fixes for dereferencing tags in Repository.resolve(), 2008-09-12)
> would fix it, but it didn't.

The fixes are only for the code path where reference expressions needs
to be resolved. From what I understand, the problem you have
encountered is due to resolve() falling back to using resolveSimple()
which doesn't dereference any tags. Perhaps EGit could postfix ^{} or
^{commit} to the tag name before calling mapCommit(), or whatever it
uses?

-- 
Jonas Fonseca

```

## Shawn O. Pearce, 2008-09-20 00:26

Subject: Re: [EGIT] Checking out signed tags fails
Message-ID: <20080920002648.GG13139@spearce.org>
URL: https://gitlist.dev/e/20080920002648.GG13139%40spearce.org
In-Reply-To: <2c6b72b30809161148p2b4ce08fh32ff5717ca85e773@mail.gmail.com>

```
Jonas Fonseca <jonas.fonseca@gmail.com> wrote:
> On Tue, Sep 16, 2008 at 14:58, Jonas Flodén <jonas.floden@gmail.com> wrote:
> > When trying to check-out a signed tag I get the following Error:
> > Unable to switch branches
> >
> > Reason:
> >  Mapping commit: refs/tags/v1.3.1.1
> >
> > And in details:
> > Object XXX is not a commit.
> >
> > The object ID shown is actually the id for the tag object and not the
> > tagged commit.
> >
> > This was tested with the latest master. It seemed commit 1f460e2 (Tests
> > and fixes for dereferencing tags in Repository.resolve(), 2008-09-12)
> > would fix it, but it didn't.
> 
> The fixes are only for the code path where reference expressions needs
> to be resolved. From what I understand, the problem you have
> encountered is due to resolve() falling back to using resolveSimple()
> which doesn't dereference any tags. Perhaps EGit could postfix ^{} or
> ^{commit} to the tag name before calling mapCommit(), or whatever it
> uses?

Yea, a ^{} is missing somwhere...  this is now in the issue tracker.
I'm behind and probably won't look at it more this week, but its
probably a simple thing in the checkout UI.

-- 
Shawn.

```
