;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2019, 2020 Ludovic Courtès ;;; Copyright © 2021 Xinglu Chen . (define-module (test-git) #:use-module (git) #:use-module (guix git) #:use-module (guix tests git) #:use-module (guix build utils) #:use-module (srfi srfi-1) #:use-module (
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'nix/libstore/local-store.hh')
0 files changed, 0 insertions, 0 deletions
(commit2 (find-commit repository "second")) (commit3 (find-commit repository "third")) (commit4 (find-commit repository "fourth")) (commit5 (find-commit repository "fifth"))) (and (lset= eq? (commit-difference commit4 commit1 (list commit2)) (list commit3 commit4)) (lset= eq? (commit-difference commit4 commit1 (list commit3)) (list commit4)) (null? (commit-difference commit4 commit1 (list commit5)))))))) (unless (which (git-command)) (test-skip 1)) (test-equal "commit-relation" '(self ;master3 master3 ancestor ;master1 master3 descendant ;master3 master1 unrelated ;master2 branch1 unrelated ;branch1 master2 ancestor ;branch1 merge descendant ;merge branch1 ancestor ;master1 merge descendant) ;merge master1 (with-temporary-git-repository directory '((add "a.txt" "A") (commit "first commit") (branch "hack") (checkout "hack") (add "1.txt" "1") (commit "branch commit") (checkout "master") (add "b.txt" "B") (commit "second commit") (add "c.txt" "C") (commit "third commit") (merge "hack" "merge")) (with-repository directory repository (let ((master1 (find-commit repository "first")) (master2 (find-commit repository "second")) (master3 (find-commit repository "third")) (branch1 (find-commit repository "branch")) (merge (find-commit repository "merge"))) (list (commit-relation master3 master3) (commit-relation master1 master3) (commit-relation master3 master1) (commit-relation master2 branch1) (commit-relation branch1 master2) (commit-relation branch1 merge) (commit-relation merge branch1) (commit-relation master1 merge) (commit-relation merge master1)))))) (unless (which (git-command)) (test-skip 1)) (test-equal "remote-refs" '("refs/heads/develop" "refs/heads/master" "refs/tags/v1.0" "refs/tags/v1.1") (with-temporary-git-repository directory '((add "a.txt" "A") (commit "First commit") (tag "v1.0" "release-1.0") (branch "develop") (checkout "develop") (add "b.txt" "B") (commit "Second commit") (tag "v1.1" "release-1.1")) (remote-refs directory))) (unless (which (git-command)) (test-skip 1)) (test-equal "remote-refs: only tags" '("refs/tags/v1.0" "refs/tags/v1.1") (with-temporary-git-repository directory '((add "a.txt" "A") (commit "First commit") (tag "v1.0" "Release 1.0") (add "b.txt" "B") (commit "Second commit") (tag "v1.1" "Release 1.1")) (remote-refs directory #:tags? #t))) (test-end "git")