summaryrefslogtreecommitdiff
path: root/guix/git.scm
Commit message (Collapse)AuthorAge
* git: 'update-cached-checkout' returns the commit relation.Ludovic Courtès2020-05-25
| | | | | | | | | | | * guix/git.scm (update-cached-checkout): Add #:starting-commit parameter. Call 'commit-relation' when #:starting-commit is true. Always return the relation or #f as the third value. (latest-repository-commit): Adjust accordingly. * guix/import/opam.scm (get-opam-repository): Likewise. * tests/channels.scm ("latest-channel-instances includes channel dependencies") ("latest-channel-instances excludes duplicate channel dependencies"): Update mock of 'update-cached-checkout' accordingly.
* git: Add 'commit-relation'.Ludovic Courtès2020-05-25
| | | | | * guix/git.scm (commit-relation): New procedure. * tests/git.scm ("commit-relation"): New test.
* channels: Add mechanism to patch checkouts of the 'guix channel.Ludovic Courtès2020-05-07
| | | | | | | | | | | | | | | * guix/channels.scm (<patch>): New record type. (apply-patches): New procedure. (latest-channel-instance)[dot-git?]: New procedure. Use 'update-cached-checkout' and 'add-to-store' instead of 'latest-repository-commit'. Call 'apply-patches' when CHANNEL is the 'guix channel. (%patches): New variable. * guix/git.scm (url+commit->name): Make public. * tests/channels.scm ("latest-channel-instances includes channel dependencies") ("latest-channel-instances excludes duplicate channel dependencies"): Mock 'update-cached-checkout' instead of 'latest-repository-commit'. Wrap body in 'with-store' and pass the store to 'latest-channel-instances'.
* git: Don't try to resolve tags with 'tag-lookup'.Ludovic Courtès2020-04-02
| | | | | | | | Fixes <https://bugs.gnu.org/40377>. Reported by Brice Waegeneire <brice@waegenei.re>. * guix/git.scm (switch-to-ref): In the 'tag case, remove call to 'tag-lookup'.
* git: Add missing exports for <git-checkout>.Ludovic Courtès2020-02-10
| | | | | * guix/git.scm (<git-checkout>): Export 'git-checkout-commit' and 'git-checkout-recursive?'.
* git: Remove leftover pk call.Mathieu Othacehe2020-02-06
| | | | * guix/git.scm (update-cached-checkout): Remove leftover pk call.
* git: Add ssh authentication support.Mathieu Othacehe2020-02-06
| | | | | | | | | If Guile-Git revision is >= 0.3.0, use SSH agent authentication method for both clone and fetch calls. * guix/git.scm (auth-supported?): New variable, (clone*): set auth-method to ssh-agent if the variable above is true, (update-cached-checkout): ditto.
* download, git: Refer to the right module in 'module-use!' call.Ludovic Courtès2020-01-07
| | | | | | | | | This fixes a regression introduced in 6a7c4636d4dec47eefa03c95da5a1315bd0e0413. * guix/build/download.scm (load-gnutls): Call 'resolve-module' instead of 'current-module'. * guix/git.scm (load-git-submodules): Likewise.
* Adjust module autoloads.Ludovic Courtès2020-01-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Guile < 2.9.7, autoloading a module would give you access to all its bindings. In future versions, autoloading a module gives access only to the listed bindings, as per #:select (see <https://bugs.gnu.org/38895>). This commit adjusts autoloads to the new semantics, allowing Guix to be built with Guile 2.9.7/2.9.8. * guix/build/download.scm <top level>: Remove call to 'module-autoload!'. (load-gnutls): New procedure. (tls-wrap): Call it. * guix/git.scm <top level>: Remove call to 'module-autoload!'. (load-git-submodules): New procedure. (update-submodules): Call it instead of 'resolve-interface'. * gnu/bootloader/grub.scm: Replace #:autoload with #:use-module. * gnu/packages.scm: Likewise. * gnu/packages/ssh.scm: Likewise. * gnu/packages/tex.scm: Likewise. * gnu/services/cuirass.scm: Likewise. * gnu/services/mcron.scm: Likewise. * guix/lint.scm: Augment list of bindings in #:autoload. * guix/scripts/build.scm: Likewise. * guix/scripts/gc.scm: Likewise. * guix/scripts/pack.scm: Likewise. * guix/scripts/publish.scm: Likewise. * guix/scripts/pull.scm: Likewise. * guix/utils.scm: Remove unnecessary #:autoload clauses; replace one of them with #:use-module.
* git: 'commit-difference' takes a list of excluded commits.Ludovic Courtès2019-12-27
| | | | | | | * 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.
* git: Add 'commit-difference'.Ludovic Courtès2019-09-23
| | | | | | | * 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.
* git: 'update-cached-checkout' avoids network access when unnecessary.Ludovic Courtès2019-09-23
| | | | | | * guix/git.scm (reference-available?): New procedure. (update-cached-checkout): Avoid call to 'remote-fetch' when REPOSITORY already contains REF.
* git: 'switch-to-ref' resolves tag targets.Ludovic Courtès2019-07-26
| | | | | | * guix/git.scm (switch-to-ref): In the 'tag' case, resolve the target of the tag. * tests/guix-build-branch.sh: Adjust test accordingly.
* git: <git-checkout> allows tags in its 'commit' field.Ludovic Courtès2019-07-26
| | | | | | | | | | | Fixes <https://bugs.gnu.org/36371>. Reported by Tobias Geerinckx-Rice <me@tobias.gr>. * guix/git.scm (git-checkout-compiler): Pass 'tag-or-commit' to 'latest-repository-commit*'. * doc/guix.texi (Package Transformation Options): Update '--with-commit' documentation accordingly. * tests/guix-build-branch.sh: Add test.
* git: 'update-cached-checkout' supports a 'tag-or-commit' type of ref.Ludovic Courtès2019-07-26
| | | | | | * guix/git.scm (switch-to-ref)[obj]: Wrap in 'resolve' lambda. Add 'tag-or-commit' case. (update-cached-checkout): Document it.
* git: Add an exception printer for 'git-error'.Ludovic Courtès2019-02-11
| | | | | * guix/git.scm (print-git-error): New procedure. <top level>: Call 'set-exception-printer!'.
* git: Always use the system certificates by default.Ludovic Courtès2019-02-08
| | | | | | | | | | | | 'guix pull' was always doing it, and now '--with-branch' & co. will do it as well. * guix/git.scm (honor-system-x509-certificates!): New procedure. (%certificates-initialized?): New variable. (with-libgit2): Add call to 'honor-system-x509-certificates!'. * guix/scripts/pull.scm (honor-x509-certificates): Call 'honor-system-x509-certificates!' and fall back to 'honor-lets-encrypt-certificates!'.
* git: Add a 'recursive?' field to <git-checkout> records.Ludovic Courtès2019-02-08
| | | | | | * guix/git.scm (<git-checkout>)[recursive?]: New field. (latest-repository-commit*): Add #:recursive? and honor it. (git-checkout-compiler): Honor the 'recursive?' field of CHECKOUT.
* git: Support recursive updates of submodules.Ludovic Courtès2019-02-08
| | | | | | | | | | | | * guix/git.scm: Autoload (git submodule). (url-cache-directory): Add #:recursive? and honor it. (call-with-repository): New procedure. (with-repository): New macro. (update-submodules): New procedure. (update-cached-checkout): Add #:recursive? and #:log-port and honor them. (latest-repository-commit): Add #:recursive? and honor it. [dot-git?]: Recognize ".git" regular files when RECURSIVE? is true.
* git: Nicely report '--with-commit' errors.Ludovic Courtès2018-11-30
| | | | | | | * guix/git.scm (latest-repository-commit*): Rewrite to catch 'git-error'. * po/guix/POTFILES.in: Add guix/git.scm. * tests/guix-build-branch.sh: Test --with-commit errors.
* guix build: Add '--with-commit'.Ludovic Courtès2018-11-30
| | | | | | | | | | | | | | * guix/git.scm (<git-checkout>)[commit]: New field. (git-checkout-compiler): Honor it. * guix/scripts/build.scm (evaluate-git-replacement-specs): Add 'proc' parameter and honor it. (transform-package-source-branch)[replace]: New procedure. Adjust 'evaluate-git-replacement-specs' accordingly. (transform-package-source-commit): New procedure. (%transformations, %transformation-options) (show-transformation-options-help): Add 'with-commit'. * tests/guix-build-branch.sh: Add test. * doc/guix.texi (Package Transformation Options): Document it.
* git: Add <git-checkout> record type.Ludovic Courtès2018-11-30
| | | | | | * guix/git.scm (<git-checkout>): New record type. (latest-repository-commit*): New procedure. (git-checkout-compiler): New gexp compiler.
* git: 'latest-repository-commit' logs its progress.Ludovic Courtès2018-11-30
| | | | * guix/git.scm (latest-repository-commit): Add #:log-port and honor it.
* git: Choose a saner default for '%repository-cache-directory'.Ludovic Courtès2018-09-17
| | | | | * guix/git.scm (%repository-cache-directory): Use 'cache-directory' by default unless running as root.
* git: Don't require users to specifiy "origin/" for branches.Ludovic Courtès2018-09-05
| | | | | | | | | | | Fixes <https://bugs.gnu.org/32618>. Reported by Eric Brown <brown@fastmail.com>. * guix/git.scm (update-cached-checkout): Remove "origin/" from default REF. Define CANONICAL-REF and use it instead of REF. (latest-repository-commit): Remove "origin/" from default REF. * guix/channels.scm (%default-channels): Remove "origin/" from 'branch'.
* Switch to Guile-Gcrypt.Ludovic Courtès2018-09-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes (guix hash) and (guix pk-crypto), which now live as part of Guile-Gcrypt (version 0.1.0.) * guix/gcrypt.scm, guix/hash.scm, guix/pk-crypto.scm, tests/hash.scm, tests/pk-crypto.scm: Remove. * configure.ac: Test for Guile-Gcrypt. Remove LIBGCRYPT and LIBGCRYPT_LIBDIR assignments. * m4/guix.m4 (GUIX_ASSERT_LIBGCRYPT_USABLE): Remove. * README: Add Guile-Gcrypt to the dependencies; move libgcrypt as "required unless --disable-daemon". * doc/guix.texi (Requirements): Likewise. * gnu/packages/bash.scm, guix/derivations.scm, guix/docker.scm, guix/git.scm, guix/http-client.scm, guix/import/cpan.scm, guix/import/cran.scm, guix/import/crate.scm, guix/import/elpa.scm, guix/import/gnu.scm, guix/import/hackage.scm, guix/import/texlive.scm, guix/import/utils.scm, guix/nar.scm, guix/pki.scm, guix/scripts/archive.scm, guix/scripts/authenticate.scm, guix/scripts/download.scm, guix/scripts/hash.scm, guix/scripts/pack.scm, guix/scripts/publish.scm, guix/scripts/refresh.scm, guix/scripts/substitute.scm, guix/store.scm, guix/store/deduplication.scm, guix/tests.scm, tests/base32.scm, tests/builders.scm, tests/challenge.scm, tests/cpan.scm, tests/crate.scm, tests/derivations.scm, tests/gem.scm, tests/nar.scm, tests/opam.scm, tests/pki.scm, tests/publish.scm, tests/pypi.scm, tests/store-deduplication.scm, tests/store.scm, tests/substitute.scm: Adjust imports. * gnu/system/vm.scm: Likewise. (guile-sqlite3&co): Rename to... (gcrypt-sqlite3&co): ... this. Add GUILE-GCRYPT. (expression->derivation-in-linux-vm)[config]: Remove. (iso9660-image)[config]: Remove. (qemu-image)[config]: Remove. (system-docker-image)[config]: Remove. * guix/scripts/pack.scm: Adjust imports. (guile-sqlite3&co): Rename to... (gcrypt-sqlite3&co): ... this. Add GUILE-GCRYPT. (self-contained-tarball)[build]: Call 'make-config.scm' without #:libgcrypt argument. (squashfs-image)[libgcrypt]: Remove. [build]: Call 'make-config.scm' without #:libgcrypt. (docker-image)[config, json]: Remove. [build]: Add GUILE-GCRYPT to the extensions Remove (guix config) from the imported modules. * guix/self.scm (specification->package): Remove "libgcrypt", add "guile-gcrypt". (compiled-guix): Remove #:libgcrypt. [guile-gcrypt]: New variable. [dependencies]: Add it. [*core-modules*]: Remove #:libgcrypt from 'make-config.scm' call. Add #:extensions. [*config*]: Remove #:libgcrypt from 'make-config.scm' call. (%dependency-variables): Remove %libgcrypt. (make-config.scm): Remove #:libgcrypt. * build-aux/build-self.scm (guile-gcrypt): New variable. (make-config.scm): Remove #:libgcrypt. (build-program)[fake-gcrypt-hash]: New variable. Add (gcrypt hash) to the imported modules. Adjust load path assignments. * gnu/packages/package-management.scm (guix)[propagated-inputs]: Add GUILE-GCRYPT. [arguments]: In 'wrap-program' phase, add GUILE-GCRYPT to the search path.
* git: Call 'url-cache-directory' outside 'update-cached-checkout'.Oleg Pykhalov2018-07-13
| | | | | | * guix/git.scm (update-cached-checkout): Call 'url-cache-directory' in 'cache-directory' key argument. (latest-repository-commit): Call 'url-cache-directory'.
* git: Increase modularity and expose 'update-cached-checkout'.Ludovic Courtès2018-04-02
| | | | | | | | * guix/git.scm (repository->head-sha1, copy-to-store): Remove. (switch-to-ref): Return the OID of OBJ. (update-cached-checkout): New procedure, with code from 'latest-repository-commit'. (latest-repository-commit): Use it.
* git: 'latest-repository-commit' calls 'repository-close!'.Ludovic Courtès2018-03-26
| | | | | * guix/git.scm (latest-repository-commit): Call 'repository-close!' when it exists.
* git: 'switch-to-ref' accepts short commit IDs.Ludovic Courtès2018-03-18
| | | | | | | | Fixes <https://bugs.gnu.org/30716>. Reported by Björn Höfling <bjoern.hoefling@bjoernhoefling.de>. * guix/git.scm (switch-to-ref): When REF is a commit, check the length of COMMIT and use 'object-lookup-prefix' if available.
* git: Do not add '.git' to the store.Ludovic Courtès2017-11-21
| | | | | | | | This makes 'latest-repository-commit' significantly more efficient and reduces disk usage in the store. * guix/git.scm (copy-to-store)[dot-git?]: New procedure. Pass it as the #:select? argument to 'add-to-store'.
* git: Check whether 'clone-init-options' is defined.Ludovic Courtès2017-11-11
| | | | | | | This is a followup to 195f0d05c3f64e17e84b2683a7045a14ec578d61. * guix/git.scm (clone*): Check whether 'clone-init-options' is defined before using it.
* git: Work around wrong default argument of 'clone'.Ludovic Courtès2017-11-10
| | | | | | | Fixes <https://bugs.gnu.org/29238>. Reported by Benjamin Andresen <benny@in-ulm.de>. * guix/git.scm (clone*): Pass second argument to 'clone'.
* Fix ambiguous imports.Ludovic Courtès2017-11-07
| | | | | * gnu/packages/ocaml.scm: Hide 'zip' from (srfi srfi-1). * guix/git.scm: Select 'mkdir-p' from (guix build utils).
* guix: git: Stop using libgit2-shutdown.Mathieu Othacehe2017-07-01
| | | | | * guix/git.scm (with-libgit2): Stop calling (libgit2-shutdown) to prevent segfaults when pointer finalizers are run.
* guix: git: Add new module.Mathieu Othacehe2017-06-09
| | | | | | * guix/git.scm: New file. * configure.ac: Check for (guile git). * Makefile.am: Build guix/git.scm if (guile git) is available.
* Revert "guix: git: Add new module."Leo Famulari2017-05-05
| | | | | | | | | This reverts commit a70b784708fb5e1b78430aa793d89ca04bc641a8. Commit a70b784708f caused `guix pull` to fail: ERROR: In procedure scm-error: ERROR: no code for module (git)
* guix: git: Add new module.Mathieu Othacehe2017-05-05
* guix/git.scm: New file. * configure.ac: Check for (guile git). * Makefile.am: Build guix/git.scm if (guile git) is available.