From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timothy Sample Subject: Re: git-annex: problematic shebangs in .git/hooks/pre-commit? Date: Thu, 23 Aug 2018 12:44:24 -0400 Message-ID: <87wosh2ftj.fsf@ngyro.com> References: <876001xe9c.fsf@kyleam.com> 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]:34770) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fssim-0006Kc-Td for guix-devel@gnu.org; Thu, 23 Aug 2018 12:44:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fssii-0005aE-7B for guix-devel@gnu.org; Thu, 23 Aug 2018 12:44:32 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:58795) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fssii-0005a0-1y for guix-devel@gnu.org; Thu, 23 Aug 2018 12:44:28 -0400 In-Reply-To: <876001xe9c.fsf@kyleam.com> (Kyle Meyer's message of "Thu, 23 Aug 2018 12:02:23 -0400") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Kyle Meyer Cc: guix-devel Hi Kyle, Kyle Meyer writes: > Hello, > > Thanks for packaging git-annex, Tim! I'm excited to see it in Guix. You=E2=80=99re welcome! > I'm wondering whether the shebang patching in .git/hooks/pre-commit will > cause a problem. Using the patched shellPath_portable, 'git annex init' > generates a hook like this: > > % cat .git/hooks/pre-commit > #!/gnu/store/rbrandv7anzjxqkr40d7fkanzssslk4b-bash-minimal-4.4.19/bin= /sh > # automatically configured by git-annex > git annex pre-commit . > > But won't this break if that particular bash-mininimal is garbage collect= ed? My understanding is that since git-annex contains a reference to bash-minimal, the garbage collector will leave it alone. Indeed, running =E2=80=9Cguix gc --references /gnu/store/=E2=80=A6-git-annex-201806= 26=E2=80=9D shows that Guix knows that git-annex needs bash-minimal. As long as git-annex is available (a prerequisite to the pre-commit hook working) bash-minimal will be available. -- Tim