summaryrefslogtreecommitdiff
path: root/guix/git.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-06-08 21:39:55 +0200
committerLudovic Courtès <ludo@gnu.org>2020-06-09 00:34:52 +0200
commit72357e2170e88f73c11ff089f87a744cee8606ec (patch)
tree6a80061f7a74c68ab6ed8a2e8144ed3c27742d40 /guix/git.scm
parent5d95ac9178c2b4f5510390b0c31d440efc3c203d (diff)
git: 'commit-difference' really excludes the ancestors of #:excluded.
* guix/git.scm (commit-difference): Initialize VISITED to the closure of OLD and EXCLUDED, as written in the docstring. * tests/git.scm ("commit-difference, excluded commits"): Adjust accordingly.
Diffstat (limited to 'guix/git.scm')
-rw-r--r--guix/git.scm4
1 files changed, 3 insertions, 1 deletions
diff --git a/guix/git.scm b/guix/git.scm
index 1671f57d9f..0d8e617cc9 100644
--- a/guix/git.scm
+++ b/guix/git.scm
@@ -416,7 +416,9 @@ Essentially, this computes the set difference between the closure of NEW and
that of OLD."
(let loop ((commits (list new))
(result '())
- (visited (commit-closure old (list->setq excluded))))
+ (visited (fold commit-closure
+ (setq)
+ (cons old excluded))))
(match commits
(()
(reverse result))