From 58e268c2e30567f415fa4e02086e49299c31406a Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 2 Jul 2024 14:52:07 +0200 Subject: git: Remove untracked files from cached checkouts. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cached checkouts could end up with stale untracked files, for example because the checkout was interrupted. As a result, when this happens for the Guix checkout, users would not get substitutes for ‘guix pull’. * guix/git.scm (delete-untracked-files): New procedure. (switch-to-ref): Use it. * tests/git.scm ("update-cached-checkout, untracked files removed"): New test. Co-authored-by: Ricardo Wurmus Change-Id: Iccbe644ade396ad27a037db7e0ef1c2a68ef91ce --- tests/git.scm | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'tests/git.scm') diff --git a/tests/git.scm b/tests/git.scm index ad43435b674..9ccd04f0cdf 100644 --- a/tests/git.scm +++ b/tests/git.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2019, 2020, 2022 Ludovic Courtès +;;; Copyright © 2019-2020, 2022, 2024 Ludovic Courtès ;;; Copyright © 2021 Xinglu Chen