Subject: bug#22423: closed (Re: bug#22423: git-fetch does not update checked out tree when commit hash changes)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 21 Jan 2016 08:51:02 +0000

Your bug report

#22423: git-fetch does not update checked out tree when commit hash changes

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
22423: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22423
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#22423: git-fetch does not update checked out tree when commit hash changes
From: [email-masked] (Ludovic Courtès)
To: Pjotr Prins <[email-masked]>
Cc: [email-masked]
Date: Thu, 21 Jan 2016 09:50:18 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Pjotr Prins <[email-masked]> 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’.

Subject: git-fetch does not update checked out tree when commit hash changes
From: Pjotr Prins <[email-masked]>
To: [email-masked]
Date: Thu, 21 Jan 2016 07:54:03 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

I can reliably reproduce this using a recent version of GNU Guix. 

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.

Removing the git-checkout dir and updating the Hash gives a missing
dir error (as expected when they use the same).