| Age | Commit message (Collapse) | Author | Files | Lines |
|
* tests/git.scm (git): New procedure.
("update-cached-checkout, tag",
"update-cached-checkout, recursive submodules follow ref",
"update-cached-checkout, symref tag",
"update-cached-checkout, symref pull-request"): Use it.
Change-Id: I85aa14e729be1efe691418e74e37d6ae1fd3e633
|
|
Follow up of 8d27b1158de3cc1823d33847cb722722c769a27e discussed in #9231.
* tests/git.scm ("update-cached-checkout, recursive submodules follow ref"):
Replace the nested 'let' by 'let*'.
Merges: #9683
Change-Id: Ibd212bbd2b6fbf02f6fcae0ecb21922686b5f8bc
|
|
Previously, update-cached-checkout updated submodules before switching the
cached parent checkout to the requested ref. A second recursive update could
therefore update submodules according to the previously checked-out parent
tree, then reset the parent to a ref whose gitlinks name different submodule
commits, leaving submodule worktrees stale.
* guix/git.scm (update-cached-checkout): Update submodules after switching to the requested ref.
* tests/git.scm ("update-cached-checkout, recursive submodules follow ref"): New test.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Fixes: guix/guix#7741
Merges: #9231
|
|
Without running 'checkout' as the last Git directives to one branch that
doesn't own the Git tag, the test is trivial thus poorly relevant. This
change checks that 'update-cached-checkout' and that the 'cached-directory'
return both the correct Git object identifier matching the upstream Git object
identifier of the Git tag.
* tests/git.scm ("update-cached-checkout, tag"): Switch to 'master' branch and
improve the checks.
Fixes: guix/guix#9340
Merges: guix/guix!9341
Change-Id: I698f94858a4247b8bdcc54758f38f3623890b6af
|
|
* guix/channels.scm (channel-reference): Allow 'symref' to store both branch
name and specific commit.
* guix/git.scm (resolve-reference, reference-available?): Adjust.
(update-cached-checkout)[ref->refspecs]: Adjust.
* guix/tests/git.scm (populate-git-repository): Add 'symbolic-ref' directive.
* tests/git.scm (update-cached-checkout, symref tag): Check considering Git
tag as symref.
(update-cached-checkout, symref pull-request): Mimick Pull Request symref and
check it.
Fixes: guix/guix#6910
Merges: guix/guix!7085
Change-Id: I33e2974aefcc15fff24c0df8ab7d24128c7f0046
|
|
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 <rekado@elephly.net>
Change-Id: Iccbe644ade396ad27a037db7e0ef1c2a68ef91ce
|
|
* tests/channels.scm (gpg+git-available?): Check for ‘gpg-command’
only.
Remove all ‘test-skip’ statements.
* tests/derivations.scm: Likewise.
* tests/git-authenticate.scm: Likewise.
* tests/git.scm: Likewise.
* tests/import-git.scm: Likewise.
|
|
Previously, starting with commit
efa578ecaece67366b4b0e2266de7c2faaa4ae54, 'update-cached-checkout' would
return the OID of the annotated tag the tag points to. With this change
it returns the OID of the commit object in all cases.
* guix/git.scm (resolve-reference): In the 'tag' case, call
'tag-target-id' and 'tag-lookup' when OID designates an annotated tag.
* tests/git.scm ("update-cached-checkout, tag"): New test.
|
|
* guix/git.scm (commit-descendant?): New procedure.
* tests/git.scm ("commit-descendant?"): New test.
|
|
* guix/git.scm (ls-remote-refs): New procedure.
* tests/git.scm ("remote-refs" "remote-refs: only tags"): New tests.
* guix/import/git.scm: New file.
* doc/guix.texi (Invoking guix refresh): Document it.
* tests/import-git.scm: New test file.
* Makefile.am (MODULES, SCM_TESTS): Register the new files.
Co-authored-by: Sarah Morgensen <iskarian@mgsn.dev>
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
|
|
* 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.
|
|
* guix/git.scm (commit-relation): New procedure.
* tests/git.scm ("commit-relation"): New test.
|
|
* guix/git.scm (commit-closure): Add 'visited' optional parameter.
(commit-difference): Add 'excluded' optional parameter; pass second
argument to 'commit-closure'.
* tests/git.scm ("commit-difference, excluded commits"): New test.
|
|
* guix/git.scm (commit-closure, commit-difference): New procedures.
* guix/tests/git.scm, tests/git.scm: New files.
* Makefile.am (dist_noinst_DATA): Add guix/tests/git.scm.
(SCM_TESTS): Add tests/git.scm.
|