GNU bug report logs - #22423
git-fetch does not update checked out tree when commit hash changes

Previous Next

Package: guix;

Reported by: Pjotr Prins <pjotr.public12 <at> thebird.nl>

Date: Thu, 21 Jan 2016 06:55:02 UTC

Severity: normal

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

Full log


Message #10 received at 22423-done <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Pjotr Prins <pjotr.public12 <at> thebird.nl>
Cc: 22423-done <at> debbugs.gnu.org
Subject: Re: bug#22423: git-fetch does not update checked out tree when commit
 hash changes
Date: Thu, 21 Jan 2016 09:50:18 +0100
Pjotr Prins <pjotr.public12 <at> thebird.nl> skribis:

> When updating the commit hash to a different commit the git-fetch
> derivation *does* change (I checked in guile), but the checked out git
> tree in the store does not change - it gets shared between the
> commits. I am not sure why the tree gets shared, but the effect is
> that the same package gets installed using the same
> /gnu/store/xxx-git-checkout.

This is expected: origins are fixed-output derivations, meaning that it
does not matter how we perform them (using Git, over HTTP, or thanks to
an avian carrier), as long as the result has the specified sha256.

Thus, when you change, say, the Git commit ID or origin ‘method’ without
changing the ‘sha256’ field, nothing happens: the daemon says “OK, I
already have a store item with that ‘sha256’, so I don’t do anything.”

Clearly, one has to be cautious with this, it’s easy to mistakenly use
the old source.

Hope this clarifies things!

Ludo’.




This bug report was last modified 9 years and 125 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.