unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Oleg Pykhalov <go.wigust@gmail.com>
Cc: 48008@debbugs.gnu.org
Subject: bug#48008: guix time-machine: error: Git error: the requested type does not match the type in the ODB
Date: Fri, 30 Apr 2021 17:53:35 +0200	[thread overview]
Message-ID: <87eeerbwg0.fsf@gnu.org> (raw)
In-Reply-To: <87h7jv2xi7.fsf@gmail.com> (Oleg Pykhalov's message of "Sun, 25 Apr 2021 00:17:20 +0300")

Hi Oleg,

Oleg Pykhalov <go.wigust@gmail.com> skribis:

> guix time-machine fails for 5b7a1cb0 (doesn't fail for the parent commit
> baab87ac).
>
> $ mv ~/.cache/guix/checkouts  ~/.cache/guix/checkouts.1
>
> $ guix time-machine --commit=5b7a1cb077931a020c0b7e3b12f12a7bda221d96 -- build hello
> Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
> guix time-machine: error: Git error: the requested type does not match the type in the ODB

What ‘guix’ is trying to tell us is that
5b7a1cb077931a020c0b7e3b12f12a7bda221d96 is not a “commit” object: it’s
a “tag” (or “annotated tag”) object.

Instead, you should run:

  guix time-machine --commit=d68de958b60426798ed62797ff7c96c327a672ac -- \
    build hello 

… where d68de958b60426798ed62797ff7c96c327a672ac is the commit this tag
points to (v1.0.1).

That said, as a user, one certainly doesn’t care about this subtlety.
It would be nice if (guix git) could automatically dereference annotated
tags, though it doesn’t seem to be that simple (there are places where
we explicitly ask for a commit object and we need to keep some sort of
“type checks” on Git objects).

Thanks,
Ludo’.




      reply	other threads:[~2021-04-30 15:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-24 21:17 bug#48008: guix time-machine: error: Git error: the requested type does not match the type in the ODB Oleg Pykhalov
2021-04-30 15:53 ` Ludovic Courtès [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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87eeerbwg0.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=48008@debbugs.gnu.org \
    --cc=go.wigust@gmail.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).