From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#22423: git-fetch does not update checked out tree when commit hash changes Date: Thu, 21 Jan 2016 09:50:18 +0100 Message-ID: <87twm79v05.fsf@gnu.org> References: <20160121065403.GA4278@thebird.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44115) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMAxP-00034A-SW for bug-guix@gnu.org; Thu, 21 Jan 2016 03:51:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMAxK-00084s-Q1 for bug-guix@gnu.org; Thu, 21 Jan 2016 03:51:07 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:39329) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMAxK-00084o-NE for bug-guix@gnu.org; Thu, 21 Jan 2016 03:51:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aMAxK-0004cn-Hp for bug-guix@gnu.org; Thu, 21 Jan 2016 03:51:02 -0500 Sender: "Debbugs-submit" Resent-To: bug-guix@gnu.org Resent-Message-ID: In-Reply-To: <20160121065403.GA4278@thebird.nl> (Pjotr Prins's message of "Thu, 21 Jan 2016 07:54:03 +0100") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Pjotr Prins Cc: 22423-done@debbugs.gnu.org Pjotr Prins 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 =E2=80=98method=E2= =80=99 without changing the =E2=80=98sha256=E2=80=99 field, nothing happens: the daemon sa= ys =E2=80=9COK, I already have a store item with that =E2=80=98sha256=E2=80=99, so I don=E2= =80=99t do anything.=E2=80=9D Clearly, one has to be cautious with this, it=E2=80=99s easy to mistakenly = use the old source. Hope this clarifies things! Ludo=E2=80=99.