Hello community, here is the log from the commit of package guile-git for openSUSE:Factory checked in at 2019-02-27 15:07:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/guile-git (Old) and /work/SRC/openSUSE:Factory/.guile-git.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "guile-git" Wed Feb 27 15:07:46 2019 rev:3 rq:679503 version:0.2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/guile-git/guile-git.changes 2018-09-18 11:47:39.575647352 +0200 +++ /work/SRC/openSUSE:Factory/.guile-git.new.28833/guile-git.changes 2019-02-27 15:07:54.122414985 +0100 @@ -1,0 +2,18 @@ +Wed Jan 30 10:25:21 UTC 2019 - [email protected] + +- upate to 0.2.0: + * New Functionality + ** Add (git submodule) module + * Bug fixes + ** Fix experience in REPL + ** Correctly export ~repository-working-directory~ + For more details see /usr/share/doc/packages/guile-git/NEWS +- package NEWS file + +------------------------------------------------------------------- +Tue Dec 11 21:43:19 UTC 2018 - [email protected] + +- add libgit2-devel as run time dependency to avoid + "/usr/lib64/libgit2", message: "file not found" error + +------------------------------------------------------------------- Old: ---- guile-git-v0.1.0.tar.gz New: ---- guile-git-v0.2.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ guile-git.spec ++++++ --- /var/tmp/diff_new_pack.06AO6Y/_old 2019-02-27 15:07:55.386414601 +0100 +++ /var/tmp/diff_new_pack.06AO6Y/_new 2019-02-27 15:07:55.418414591 +0100 @@ -1,7 +1,7 @@ # # spec file for package guile-git # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: guile-git -Version: 0.1.0 +Version: 0.2.0 Release: 0 Summary: Guile bindings of libgit2 License: GPL-3.0-or-later @@ -33,6 +33,7 @@ BuildRequires: texinfo Requires: guile Requires: guile-bytestructures +Requires: libgit2-devel Requires(pre): %{install_info_prereq} BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -60,7 +61,7 @@ %files %defattr(-,root,root) %license COPYING -%doc README.md +%doc NEWS README.md %{_libdir}/guile/2.*/site-ccache/git* %{_datadir}/guile/site/2.*/git* %{_infodir}/guile-git.info.gz ++++++ guile-git-v0.1.0.tar.gz -> guile-git-v0.2.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guile-git-v0.1.0/COPYING.LESSER new/guile-git-v0.2.0/COPYING.LESSER --- old/guile-git-v0.1.0/COPYING.LESSER 1970-01-01 01:00:00.000000000 +0100 +++ new/guile-git-v0.2.0/COPYING.LESSER 2019-01-01 23:13:40.000000000 +0100 @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guile-git-v0.1.0/Makefile.am new/guile-git-v0.2.0/Makefile.am --- old/guile-git-v0.1.0/Makefile.am 2018-07-01 21:57:15.000000000 +0200 +++ new/guile-git-v0.2.0/Makefile.am 2019-01-01 23:13:40.000000000 +0100 @@ -1,3 +1,24 @@ +# Guile-Git --- GNU Guile bindings of libgit2 +# Copyright © 2016-2018 Erik Edrosa <[email protected]> +# Copyright © 2016, 2017 Amirouche Boubekki <[email protected]> +# Copyright © 2017, 2018 Ludovic Courtès <[email protected]> +# Copyright © 2017 Mathieu Othacehe <[email protected]> +# +# This file is part of Guile-Git. +# +# Guile-Git is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# Guile-Git is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Guile-Git. If not, see <http://www.gnu.org/licenses/>. + include guile.am moddir=$(prefix)/share/guile/site/$(GUILE_EFFECTIVE_VERSION) @@ -15,7 +36,6 @@ git/cherrypick.scm \ git/clone.scm \ git/commit.scm \ - git/config.scm \ git/cred.scm \ git/errors.scm \ git/fetch.scm \ @@ -29,6 +49,7 @@ git/settings.scm \ git/status.scm \ git/structs.scm \ + git/submodule.scm \ git/tag.scm \ git/tree.scm \ git/types.scm \ @@ -41,10 +62,14 @@ git/web/config.scm \ git/web/repository.scm +NODIST_SOURCES = \ + git/config.scm + TESTS_UTILS = \ tests/helpers.scm \ tests/data/simple-bare.tgz \ - tests/data/simple.tgz + tests/data/simple.tgz \ + tests/data/README TESTS = \ tests/branch.scm \ @@ -56,6 +81,7 @@ tests/remote.scm \ tests/rev-parse.scm \ tests/status.scm \ + tests/submodule.scm \ tests/tree.scm TEST_EXTENSIONS = .scm @@ -76,10 +102,9 @@ EXTRA_DIST += \ README.md \ pre-inst-env.in \ - guix.scm \ build-aux/test-driver.scm \ static/bg.png \ static/main.css \ - static/normalize.css \ + static/README \ $(TESTS) \ $(TESTS_UTILS) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guile-git-v0.1.0/NEWS new/guile-git-v0.2.0/NEWS --- old/guile-git-v0.1.0/NEWS 1970-01-01 01:00:00.000000000 +0100 +++ new/guile-git-v0.2.0/NEWS 2019-01-01 23:13:40.000000000 +0100 @@ -0,0 +1,36 @@ + -*- org -*- +#+TITLE: Guile-Git NEWS - history of user-visible changes + + +Copyright © 2018 Erik Edrosa + + Copying and distribution of this file, with or without modification, + are permitted in any medium without royalty provided the copyright + notice and this notice are preserved. This file is offered as-is, + without any warranty. + +* Changes in 0.2.0 (since 0.1.0) + +** New Functionality + +*** Add (git submodule) module + +Add some initial bindings to libgit2's submodule functions. These +include ~git_submodule_name~, ~git_submodule_path~, +~git_submodule_owner~, ~git_submodule_head_id~, +~git_submodule_lookup~, ~git_submodule_init~, ~git_submodule_reload~, +~git_submodule_add_setup~, ~git_submodule_add_finalize~, +~git_submodule_add_to_index~, ~git_submodule_set_branch~, and +~git_submodule_update~. + +** Bug fixes + +*** Fix experience in REPL + +When in the ~(git)~ module, you can use ~,use~ and ~,apropos~ in the +Guile REPL to get module and bindings in the module. + +*** Correctly export ~repository-working-directory~ + +~(git repository)~ was exporting the incorrectly named +~repository-workdir~. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guile-git-v0.1.0/README.md new/guile-git-v0.2.0/README.md --- old/guile-git-v0.1.0/README.md 2018-07-01 21:57:15.000000000 +0200 +++ new/guile-git-v0.2.0/README.md 2019-01-01 23:13:40.000000000 +0100 @@ -1,20 +1,48 @@ -# guile-git +# Guile-Git -This is the repository of guile bindings of git hosted -@ [gitlab](https://gitlab.com/guile-git/guile-git): +Guile-Git is a GNU Guile library providing bindings to +[libgit2](https://libgit2.org/). -```bash -git clone https://gitlab.com/guile-git/guile-git.git -``` +Copyright © 2016, 2017 Amirouche Boubekki +Copyright © 2018 Erik Edrosa +Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without any warranty. ## Documentation -Read the source and have a look at [libgit2 reference](http://libgit2.github.com/) +The documentation is currently a work in progress, so please read the +source and have a look at the [libgit2 API](https://libgit2.org/libgit2/#HEAD). + +## Installation + +Guile-Git uses GNU autotools to create the build and installation +scripts. The default install location is in `/usr/local`. From a +release tarball you can run: + +```sh +./configure +make +sudo make install +``` + +This will install Guile-Git with the prefix `/usr/local/`. This +might not be the default load path for your GNU Guile. You may choose +to change the prefix to your GNU Guile's location with `./configure +--prefix=/usr` or add `/usr/local/` to GNU Guile's load path in your +`.profile` or `.bash_profile` like this (replacing 2.2 with your GNU +Guile major version): + +```sh +export GUILE_LOAD_PATH="/usr/local/share/guile/site/2.2${GUILE_LOAD_PATH:+:}$GUILE_LOAD_PATH" +export GUILE_LOAD_COMPILED_PATH="/usr/local/lib/guile/2.2/site-ccache${GUILE_LOAD_COMPILED_PATH:+:}$GUILE_COMPILED_LOAD_PATH" +``` ## How to contribute -To start hacking on guile-git install [guix](https://gnu.org/s/guix) and run the -following command: +The easiest way to start hacking on guile-git is to install +[GNU Guix](https://gnu.org/s/guix) and run the following command: ```bash > guix environment -l guix.scm @@ -23,7 +51,7 @@ You can then: - Create a pull request on gitlab -- Send a patch to one of the maintainer +- Send a patch to one of the maintainers - Come and ping `amz3` or `OrangeShark` about it at `#[email protected]`. And don't forget to add a unit test! diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guile-git-v0.1.0/configure.ac new/guile-git-v0.2.0/configure.ac --- old/guile-git-v0.1.0/configure.ac 2018-07-01 21:57:15.000000000 +0200 +++ new/guile-git-v0.2.0/configure.ac 2019-01-01 23:13:40.000000000 +0100 @@ -1,5 +1,23 @@ +dnl Guile-Git --- GNU Guile bindings of libgit2 +dnl Copyright © 2016-2018 Erik Edrosa <[email protected]> +dnl Copyright © 2017 Ludovic Courtès <[email protected]> +dnl +dnl This file is part of Guile-Git. +dnl +dnl Guile-Git is free software; you can redistribute it and/or modify it +dnl under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl Guile-Git is distributed in the hope that it will be useful, but +dnl WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with Guile-Git. If not, see <http://www.gnu.org/licenses/>. -AC_INIT([Guile-Git], [0.1.0], [], [], [https://gitlab.com/guile-git/guile-git/]) +AC_INIT([Guile-Git], [0.2.0], [], [], [https://gitlab.com/guile-git/guile-git/]) AC_CONFIG_SRCDIR(git) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR([m4]) @@ -26,6 +44,5 @@ AC_CONFIG_FILES([Makefile git/config.scm]) AC_CONFIG_FILES([pre-inst-env], [chmod +x pre-inst-env]) -AC_CONFIG_FILES([test-env], [chmod +x test-env]) AC_OUTPUT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guile-git-v0.1.0/git/repository.scm new/guile-git-v0.2.0/git/repository.scm --- old/guile-git-v0.1.0/git/repository.scm 2018-07-01 21:57:15.000000000 +0200 +++ new/guile-git-v0.2.0/git/repository.scm 2019-01-01 23:13:40.000000000 +0100 @@ -47,7 +47,7 @@ repository-refdb repository-set-ident repository-state - repository-workdir + repository-working-directory pointer->repository!)) ;;; repository diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guile-git-v0.1.0/git/submodule.scm new/guile-git-v0.2.0/git/submodule.scm --- old/guile-git-v0.1.0/git/submodule.scm 1970-01-01 01:00:00.000000000 +0100 +++ new/guile-git-v0.2.0/git/submodule.scm 2019-01-01 23:13:40.000000000 +0100 @@ -0,0 +1,192 @@ +;;; Guile-Git --- GNU Guile bindings of libgit2 +;;; Copyright © 2018 Ludovic Courtès <[email protected]> +;;; +;;; This file is part of Guile-Git. +;;; +;;; Guile-Git is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or +;;; (at your option) any later version. +;;; +;;; Guile-Git is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;; General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with Guile-Git. If not, see <http://www.gnu.org/licenses/>. + +(define-module (git submodule) + #:use-module (system foreign) + #:use-module (git bindings) + #:use-module (git types) + #:use-module (git errors) + #:use-module (git structs) + #:export (repository-submodules + submodule? + submodule-lookup + submodule-name + submodule-path + submodule-owner + submodule-head-id + submodule-init + submodule-reload + submodule-add-setup + submodule-add-finalize + submodule-add-to-index + submodule-set-branch! + submodule-update)) + +;; https://libgit2.org/libgit2/#HEAD/group/submodule + +(define %submodule-free (dynamic-func "git_submodule_free" libgit2)) + +(define %submodule-owners + ;; This table maps <submodule> records to their "owner", usually a + ;; <repository> record. This is used to ensure that the lifetime of the + ;; submodule is shorter than that of its owner so that 'submodule-owner' + ;; always returns a valid object. + (make-weak-key-hash-table)) + +(define* (pointer->submodule! pointer #:optional owner) + (set-pointer-finalizer! pointer %submodule-free) + (let ((submodule (pointer->submodule pointer))) + (when owner + (hashq-set! %submodule-owners submodule owner)) + submodule)) + +(define submodule-map + (let ((proc (libgit2->procedure* "git_submodule_foreach" '(* * *)))) + (lambda (repository callback) + (let* ((result '()) + (trampoline (lambda (submodule name payload) + ;; We can't capture SUBMODULE here because its + ;; lifetime is limited to the dynamic extent of + ;; the 'git_submodule_foreach' call. + (set! result + (cons (callback (pointer->string name)) + result)) + 0))) + (proc (repository->pointer repository) + (procedure->pointer int trampoline '(* * *)) + %null-pointer) + (reverse result))))) + +(define (repository-submodules repository) + "Return the list of submodule names of REPOSITORY." + (submodule-map repository identity)) + +(define submodule-name + (let ((proc (libgit2->procedure '* "git_submodule_name" '(*)))) + (lambda (submodule) + "Get the file name of SUBMODULE." + (pointer->string (proc (submodule->pointer submodule)))))) + +(define submodule-path + (let ((proc (libgit2->procedure '* "git_submodule_path" '(*)))) + (lambda (submodule) + "Get the file name of SUBMODULE." + (pointer->string (proc (submodule->pointer submodule)))))) + +(define submodule-owner + (let ((proc (libgit2->procedure '* "git_submodule_owner" '(*)))) + (lambda (submodule) + "Return the repository that contains SUBMODULE." + (pointer->repository (proc (submodule->pointer submodule)))))) + +(define submodule-head-id + (let ((proc (libgit2->procedure '* "git_submodule_head_id" '(*)))) + (lambda (submodule) + "Return the OID for SUBMODULE in the current HEAD tree. Return #f if +that information isn't available, for instance if SUBMODULE is not fully set +up." + (let ((ptr (proc (submodule->pointer submodule)))) + (if (null-pointer? ptr) + #f + (pointer->oid ptr)))))) + +(define submodule-lookup + (let ((proc (libgit2->procedure* "git_submodule_lookup" `(* * *)))) + (lambda (repository name) + "Look up submodule NAME under REPOSITORY. Return the submodule object +on success and #f if NAME could not be found." + (let ((submodule (make-double-pointer))) + (catch 'git-error + (lambda () + (proc submodule + (repository->pointer repository) + (string->pointer name)) + (pointer->submodule! (dereference-pointer submodule) repository)) + (lambda (key error . rest) + ;; For convenience return #f in the common case. + (if (= GIT_ENOTFOUND (git-error-code error)) + #f + (apply throw key error rest)))))))) + +(define submodule-init + (let ((proc (libgit2->procedure* "git_submodule_init" `(* ,int)))) + (lambda* (submodule #:optional overwrite?) + "Copy submodule info into \".git/config\" file, just like \"git +submodule init\"." + (proc (submodule->pointer submodule) + (if overwrite? 1 0))))) + +(define submodule-reload + (let ((proc (libgit2->procedure* "git_submodule_reload" `(* ,int)))) + (lambda* (submodule #:optional force?) + "Reload SUBMODULE from '.git/config', etc." + (proc (submodule->pointer submodule) + (if force? 1 0))))) + +(define submodule-add-setup + (let ((proc (libgit2->procedure* "git_submodule_add_setup" + `(* * * * ,int)))) + (lambda* (repository url path #:key use-gitlink?) + "Set up a new submodule in REPOSITORY for the repository URL at PATH. +This does \"git submodule add\" up to the fetch and checkout of the submodule +contents. It preps a new submodule, creates an entry in .gitmodules and +creates an empty initialized repository either at the given path in the +working directory or in .git/modules with a gitlink from the working +directory to the new repo." + (let ((submodule (make-double-pointer))) + (proc submodule + (repository->pointer repository) + (string->pointer url) + (string->pointer path) + (if use-gitlink? 1 0)) + (pointer->submodule! (dereference-pointer submodule) repository))))) + +(define submodule-add-finalize + (let ((proc (libgit2->procedure* "git_submodule_add_finalize" '(*)))) + (lambda (submodule) + "Resolve the setup of SUBMODULE. This should be called on a submodule +once you have called add setup and done the clone of the submodule. This +adds the '.gitmodules' file and the newly cloned submodule to the index to be +ready to be committed (but doesn't actually do the commit)." + (proc (submodule->pointer submodule))))) + +(define submodule-add-to-index + (let ((proc (libgit2->procedure* "git_submodule_add_to_index" `(* ,int)))) + (lambda* (submodule #:optional (write-index? #t)) + "Add current submodule HEAD commit to index of superproject." + (proc (submodule->pointer submodule) + (if write-index? 1 0))))) + +(define submodule-set-branch! + (let ((proc (libgit2->procedure* "git_submodule_set_branch" '(* * *)))) + (lambda (repository name branch) + "Change to BRANCH the branch of submodule NAME in REPOSITORY." + (proc (repository->pointer repository) + (string->pointer name) + (string->pointer branch))))) + +(define submodule-update + (let ((proc (libgit2->procedure* "git_submodule_update" `(* ,int *)))) + (lambda* (submodule #:key (initialize? #t)) + "Update SUBMODULE. This will clone it and check out the subrepository +to the commit specified in the index of the containing repository. If +SUBMODULE doesn't contain the target commit, then the submodule is fetched using the +fetch options supplied in OPTIONS." + (proc (submodule->pointer submodule) + (if initialize? 1 0) + %null-pointer)))) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guile-git-v0.1.0/git/types.scm new/guile-git-v0.2.0/git/types.scm --- old/guile-git-v0.1.0/git/types.scm 2018-07-01 21:57:15.000000000 +0200 +++ new/guile-git-v0.2.0/git/types.scm 2019-01-01 23:13:40.000000000 +0100 @@ -45,6 +45,7 @@ tag? pointer->tag tag->pointer tree? pointer->tree tree->pointer tree-entry? pointer->tree-entry tree-entry->pointer + submodule? pointer->submodule submodule->pointer pointer->size_t make-size_t-pointer make-double-pointer)) @@ -95,6 +96,7 @@ (define-libgit2-type tag) (define-libgit2-type tree) (define-libgit2-type tree-entry) +(define-libgit2-type submodule) ;;; helpers diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guile-git-v0.1.0/git/web/template.scm new/guile-git-v0.2.0/git/web/template.scm --- old/guile-git-v0.1.0/git/web/template.scm 2018-07-01 21:57:15.000000000 +0200 +++ new/guile-git-v0.2.0/git/web/template.scm 2019-01-01 23:13:40.000000000 +0100 @@ -31,7 +31,6 @@ (head (meta (@ (charset "utf-8"))) (title ,title) - (link (@ (rel "stylesheet") (href "/static/normalize.css"))) (link (@ (rel "stylesheet") (href "/static/main.css")))) (body (@ (class ,body-class)) (div (h1 ,title)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guile-git-v0.1.0/git.scm new/guile-git-v0.2.0/git.scm --- old/guile-git-v0.1.0/git.scm 2018-07-01 21:57:15.000000000 +0200 +++ new/guile-git-v0.2.0/git.scm 2019-01-01 23:13:40.000000000 +0100 @@ -29,6 +29,7 @@ (git commit) (git errors) (git fetch) + (git object) (git oid) (git reference) (git repository) @@ -38,12 +39,17 @@ (git settings) (git status) (git structs) + (git submodule) (git tag) (git tree))) - (for-each (let ((i (module-public-interface (current-module)))) - (lambda (m) - (module-use! i (resolve-interface m)))) - %public-modules))) + (let* ((current-module (current-module)) + (current-module-interface (resolve-interface (module-name current-module)))) + (for-each + (lambda (git-submodule) + (let ((git-submodule-interface (resolve-interface git-submodule))) + (module-use! current-module git-submodule-interface) + (module-use! current-module-interface git-submodule-interface))) + %public-modules)))) (libgit2-init!) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guile-git-v0.1.0/guile.am new/guile-git-v0.2.0/guile.am --- old/guile-git-v0.1.0/guile.am 2018-07-01 21:57:15.000000000 +0200 +++ new/guile-git-v0.2.0/guile.am 2019-01-01 23:13:40.000000000 +0100 @@ -1,6 +1,25 @@ -GOBJECTS = $(SOURCES:%.scm=%.go) +# Guile-Git --- GNU Guile bindings of libgit2 +# Copyright © 2016 Erik Edrosa <[email protected]> +# +# This file is part of Guile-Git. +# +# Guile-Git is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# Guile-Git is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Guile-Git. If not, see <http://www.gnu.org/licenses/>. -nobase_mod_DATA = $(SOURCES) $(NOCOMP_SOURCES) + +GOBJECTS = $(SOURCES:%.scm=%.go) $(NODIST_SOURCES:%.scm=%.go) + +nobase_mod_DATA = $(SOURCES) $(NOCOMP_SOURCES) $(NODIST_SOURCES) nobase_go_DATA = $(GOBJECTS) guile_install_go_files = install-nobase_goDATA diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guile-git-v0.1.0/guix.scm new/guile-git-v0.2.0/guix.scm --- old/guile-git-v0.1.0/guix.scm 2018-07-01 21:57:15.000000000 +0200 +++ new/guile-git-v0.2.0/guix.scm 2019-01-01 23:13:40.000000000 +0100 @@ -1,4 +1,6 @@ -(use-modules ((guix licenses) #:select (lgpl3+)) + + +(use-modules ((guix licenses) #:select (gpl3+)) (guix packages) (guix build-system gnu) (gnu packages autotools) @@ -28,4 +30,4 @@ (synopsis "Guile bindings for libgit2") (description "") (home-page "") - (license lgpl3+)) + (license gpl3+)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guile-git-v0.1.0/static/README new/guile-git-v0.2.0/static/README --- old/guile-git-v0.1.0/static/README 1970-01-01 01:00:00.000000000 +0100 +++ new/guile-git-v0.2.0/static/README 2019-01-01 23:13:40.000000000 +0100 @@ -0,0 +1,6 @@ +bg.png +Copyright © 2016 Amirouche Boubekki +Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without any warranty. \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guile-git-v0.1.0/static/main.css new/guile-git-v0.2.0/static/main.css --- old/guile-git-v0.1.0/static/main.css 2018-07-01 21:57:15.000000000 +0200 +++ new/guile-git-v0.2.0/static/main.css 2019-01-01 23:13:40.000000000 +0100 @@ -1,3 +1,22 @@ +/* Guile-Git --- GNU Guile bindings of libgit2 + Copyright © 2016 Amirouche Boubekki <[email protected]> + Copyright © 2016, 2017 Erik Edrosa <[email protected]> + + This file is part of Guile-Git. + + Guile-Git is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + Guile-Git is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Guile-Git. If not, see <http://www.gnu.org/licenses/>. */ + body { background: url('bg.png'); font-family: mono; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guile-git-v0.1.0/static/normalize.css new/guile-git-v0.2.0/static/normalize.css --- old/guile-git-v0.1.0/static/normalize.css 2018-07-01 21:57:15.000000000 +0200 +++ new/guile-git-v0.2.0/static/normalize.css 1970-01-01 01:00:00.000000000 +0100 @@ -1,419 +0,0 @@ -/*! normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */ - -/** - * 1. Change the default font family in all browsers (opinionated). - * 2. Prevent adjustments of font size after orientation changes in IE and iOS. - */ - -html { - font-family: sans-serif; /* 1 */ - -ms-text-size-adjust: 100%; /* 2 */ - -webkit-text-size-adjust: 100%; /* 2 */ -} - -/** - * Remove the margin in all browsers (opinionated). - */ - -body { - margin: 0; -} - -/* HTML5 display definitions - ========================================================================== */ - -/** - * Add the correct display in IE 9-. - * 1. Add the correct display in Edge, IE, and Firefox. - * 2. Add the correct display in IE. - */ - -article, -aside, -details, /* 1 */ -figcaption, -figure, -footer, -header, -main, /* 2 */ -menu, -nav, -section, -summary { /* 1 */ - display: block; -} - -/** - * Add the correct display in IE 9-. - */ - -audio, -canvas, -progress, -video { - display: inline-block; -} - -/** - * Add the correct display in iOS 4-7. - */ - -audio:not([controls]) { - display: none; - height: 0; -} - -/** - * Add the correct vertical alignment in Chrome, Firefox, and Opera. - */ - -progress { - vertical-align: baseline; -} - -/** - * Add the correct display in IE 10-. - * 1. Add the correct display in IE. - */ - -template, /* 1 */ -[hidden] { - display: none; -} - -/* Links - ========================================================================== */ - -/** - * 1. Remove the gray background on active links in IE 10. - * 2. Remove gaps in links underline in iOS 8+ and Safari 8+. - */ - -a { - background-color: transparent; /* 1 */ - -webkit-text-decoration-skip: objects; /* 2 */ -} - -/** - * Remove the outline on focused links when they are also active or hovered - * in all browsers (opinionated). - */ - -a:active, -a:hover { - outline-width: 0; -} - -/* Text-level semantics - ========================================================================== */ - -/** - * 1. Remove the bottom border in Firefox 39-. - * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. - */ - -abbr[title] { - border-bottom: none; /* 1 */ - text-decoration: underline; /* 2 */ - text-decoration: underline dotted; /* 2 */ -} - -/** - * Prevent the duplicate application of `bolder` by the next rule in Safari 6. - */ - -b, -strong { - font-weight: inherit; -} - -/** - * Add the correct font weight in Chrome, Edge, and Safari. - */ - -b, -strong { - font-weight: bolder; -} - -/** - * Add the correct font style in Android 4.3-. - */ - -dfn { - font-style: italic; -} - -/** - * Correct the font size and margin on `h1` elements within `section` and - * `article` contexts in Chrome, Firefox, and Safari. - */ - -h1 { - font-size: 2em; - margin: 0.67em 0; -} - -/** - * Add the correct background and color in IE 9-. - */ - -mark { - background-color: #ff0; - color: #000; -} - -/** - * Add the correct font size in all browsers. - */ - -small { - font-size: 80%; -} - -/** - * Prevent `sub` and `sup` elements from affecting the line height in - * all browsers. - */ - -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sub { - bottom: -0.25em; -} - -sup { - top: -0.5em; -} - -/* Embedded content - ========================================================================== */ - -/** - * Remove the border on images inside links in IE 10-. - */ - -img { - border-style: none; -} - -/** - * Hide the overflow in IE. - */ - -svg:not(:root) { - overflow: hidden; -} - -/* Grouping content - ========================================================================== */ - -/** - * 1. Correct the inheritance and scaling of font size in all browsers. - * 2. Correct the odd `em` font sizing in all browsers. - */ - -code, -kbd, -pre, -samp { - font-family: monospace, monospace; /* 1 */ - font-size: 1em; /* 2 */ -} - -/** - * Add the correct margin in IE 8. - */ - -figure { - margin: 1em 40px; -} - -/** - * 1. Add the correct box sizing in Firefox. - * 2. Show the overflow in Edge and IE. - */ - -hr { - box-sizing: content-box; /* 1 */ - height: 0; /* 1 */ - overflow: visible; /* 2 */ -} - -/* Forms - ========================================================================== */ - -/** - * 1. Change font properties to `inherit` in all browsers (opinionated). - * 2. Remove the margin in Firefox and Safari. - */ - -button, -input, -select, -textarea { - font: inherit; /* 1 */ - margin: 0; /* 2 */ -} - -/** - * Restore the font weight unset by the previous rule. - */ - -optgroup { - font-weight: bold; -} - -/** - * Show the overflow in IE. - * 1. Show the overflow in Edge. - */ - -button, -input { /* 1 */ - overflow: visible; -} - -/** - * Remove the inheritance of text transform in Edge, Firefox, and IE. - * 1. Remove the inheritance of text transform in Firefox. - */ - -button, -select { /* 1 */ - text-transform: none; -} - -/** - * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` - * controls in Android 4. - * 2. Correct the inability to style clickable types in iOS and Safari. - */ - -button, -html [type="button"], /* 1 */ -[type="reset"], -[type="submit"] { - -webkit-appearance: button; /* 2 */ -} - -/** - * Remove the inner border and padding in Firefox. - */ - -button::-moz-focus-inner, -[type="button"]::-moz-focus-inner, -[type="reset"]::-moz-focus-inner, -[type="submit"]::-moz-focus-inner { - border-style: none; - padding: 0; -} - -/** - * Restore the focus styles unset by the previous rule. - */ - -button:-moz-focusring, -[type="button"]:-moz-focusring, -[type="reset"]:-moz-focusring, -[type="submit"]:-moz-focusring { - outline: 1px dotted ButtonText; -} - -/** - * Change the border, margin, and padding in all browsers (opinionated). - */ - -fieldset { - border: 1px solid #c0c0c0; - margin: 0 2px; - padding: 0.35em 0.625em 0.75em; -} - -/** - * 1. Correct the text wrapping in Edge and IE. - * 2. Correct the color inheritance from `fieldset` elements in IE. - * 3. Remove the padding so developers are not caught out when they zero out - * `fieldset` elements in all browsers. - */ - -legend { - box-sizing: border-box; /* 1 */ - color: inherit; /* 2 */ - display: table; /* 1 */ - max-width: 100%; /* 1 */ - padding: 0; /* 3 */ - white-space: normal; /* 1 */ -} - -/** - * Remove the default vertical scrollbar in IE. - */ - -textarea { - overflow: auto; -} - -/** - * 1. Add the correct box sizing in IE 10-. - * 2. Remove the padding in IE 10-. - */ - -[type="checkbox"], -[type="radio"] { - box-sizing: border-box; /* 1 */ - padding: 0; /* 2 */ -} - -/** - * Correct the cursor style of increment and decrement buttons in Chrome. - */ - -[type="number"]::-webkit-inner-spin-button, -[type="number"]::-webkit-outer-spin-button { - height: auto; -} - -/** - * 1. Correct the odd appearance in Chrome and Safari. - * 2. Correct the outline style in Safari. - */ - -[type="search"] { - -webkit-appearance: textfield; /* 1 */ - outline-offset: -2px; /* 2 */ -} - -/** - * Remove the inner padding and cancel buttons in Chrome and Safari on OS X. - */ - -[type="search"]::-webkit-search-cancel-button, -[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} - -/** - * Correct the text style of placeholders in Chrome, Edge, and Safari. - */ - -::-webkit-input-placeholder { - color: inherit; - opacity: 0.54; -} - -/** - * 1. Correct the inability to style clickable types in iOS and Safari. - * 2. Change font properties to `inherit` in Safari. - */ - -::-webkit-file-upload-button { - -webkit-appearance: button; /* 1 */ - font: inherit; /* 2 */ -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guile-git-v0.1.0/test-env.in new/guile-git-v0.2.0/test-env.in --- old/guile-git-v0.1.0/test-env.in 2018-07-01 21:57:15.000000000 +0200 +++ new/guile-git-v0.2.0/test-env.in 1970-01-01 01:00:00.000000000 +0100 @@ -1,5 +0,0 @@ -#!/bin/sh - -"@abs_top_builddir@/pre-inst-env" "$@" - -exit $? diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guile-git-v0.1.0/tests/branch.scm new/guile-git-v0.2.0/tests/branch.scm --- old/guile-git-v0.1.0/tests/branch.scm 2018-07-01 21:57:15.000000000 +0200 +++ new/guile-git-v0.2.0/tests/branch.scm 2019-01-01 23:13:40.000000000 +0100 @@ -1,3 +1,23 @@ +;;; Guile-Git --- GNU Guile bindings of libgit2 +;;; Copyright © 2016 Amirouche Boubekki <[email protected]> +;;; Copyright © 2017 Erik Edrosa <[email protected]> +;;; Copyright © 2017 Ludovic Courtès <[email protected]> +;;; +;;; This file is part of Guile-Git. +;;; +;;; Guile-Git is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or +;;; (at your option) any later version. +;;; +;;; Guile-Git is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;; General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with Guile-Git. If not, see <http://www.gnu.org/licenses/>. + (define-module (tests branch) #:use-module (srfi srfi-64)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guile-git-v0.1.0/tests/commit.scm new/guile-git-v0.2.0/tests/commit.scm --- old/guile-git-v0.1.0/tests/commit.scm 2018-07-01 21:57:15.000000000 +0200 +++ new/guile-git-v0.2.0/tests/commit.scm 2019-01-01 23:13:40.000000000 +0100 @@ -1,3 +1,23 @@ +;;; Guile-Git --- GNU Guile bindings of libgit2 +;;; Copyright © 2016 Amirouche Boubekki <[email protected]> +;;; Copyright © 2017 Erik Edrosa <[email protected]> +;;; Copyright © 2017 Ludovic Courtès <[email protected]> +;;; +;;; This file is part of Guile-Git. +;;; +;;; Guile-Git is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or +;;; (at your option) any later version. +;;; +;;; Guile-Git is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;; General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with Guile-Git. If not, see <http://www.gnu.org/licenses/>. + (define-module (tests commit) #:use-module (srfi srfi-64) #:use-module (ice-9 match)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guile-git-v0.1.0/tests/data/README new/guile-git-v0.2.0/tests/data/README --- old/guile-git-v0.1.0/tests/data/README 1970-01-01 01:00:00.000000000 +0100 +++ new/guile-git-v0.2.0/tests/data/README 2019-01-01 23:13:40.000000000 +0100 @@ -0,0 +1,15 @@ +These files contain git repositories to be used by Guile-Git's tests. + +simple.tgz +Copyright © 2016 Amirouche Boubekki +Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without any warranty. + +simple-bare.tgz +Copyright © 2017 Erik Edrosa +Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without any warranty. \ No newline at end of file Binary files old/guile-git-v0.1.0/tests/data/simple-bare.tgz and new/guile-git-v0.2.0/tests/data/simple-bare.tgz differ Binary files old/guile-git-v0.1.0/tests/data/simple.tgz and new/guile-git-v0.2.0/tests/data/simple.tgz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guile-git-v0.1.0/tests/helpers.scm new/guile-git-v0.2.0/tests/helpers.scm --- old/guile-git-v0.1.0/tests/helpers.scm 2018-07-01 21:57:15.000000000 +0200 +++ new/guile-git-v0.2.0/tests/helpers.scm 2019-01-01 23:13:40.000000000 +0100 @@ -1,3 +1,23 @@ +;;; Guile-Git --- GNU Guile bindings of libgit2 +;;; Copyright © 2016 Amirouche Boubekki <[email protected]> +;;; Copyright © 2017 Erik Edrosa <[email protected]> +;;; Copyright © 2017 Ludovic Courtès <[email protected]> +;;; +;;; This file is part of Guile-Git. +;;; +;;; Guile-Git is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or +;;; (at your option) any later version. +;;; +;;; Guile-Git is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;; General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with Guile-Git. If not, see <http://www.gnu.org/licenses/>. + (define-module (tests helpers)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guile-git-v0.1.0/tests/oid.scm new/guile-git-v0.2.0/tests/oid.scm --- old/guile-git-v0.1.0/tests/oid.scm 2018-07-01 21:57:15.000000000 +0200 +++ new/guile-git-v0.2.0/tests/oid.scm 2019-01-01 23:13:40.000000000 +0100 @@ -1,3 +1,21 @@ +;;; Guile-Git --- GNU Guile bindings of libgit2 +;;; Copyright © 2017, 2018 Ludovic Courtès <[email protected]> +;;; +;;; This file is part of Guile-Git. +;;; +;;; Guile-Git is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or +;;; (at your option) any later version. +;;; +;;; Guile-Git is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;; General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with Guile-Git. If not, see <http://www.gnu.org/licenses/>. + (define-module (tests oid) #:use-module (srfi srfi-64) #:use-module (tests helpers) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guile-git-v0.1.0/tests/reference.scm new/guile-git-v0.2.0/tests/reference.scm --- old/guile-git-v0.1.0/tests/reference.scm 2018-07-01 21:57:15.000000000 +0200 +++ new/guile-git-v0.2.0/tests/reference.scm 2019-01-01 23:13:40.000000000 +0100 @@ -1,3 +1,23 @@ +;;; Guile-Git --- GNU Guile bindings of libgit2 +;;; Copyright © 2016 Amirouche Boubekki <[email protected]> +;;; Copyright © 2017 Erik Edrosa <[email protected]> +;;; Copyright © 2017 Ludovic Courtès <[email protected]> +;;; +;;; This file is part of Guile-Git. +;;; +;;; Guile-Git is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or +;;; (at your option) any later version. +;;; +;;; Guile-Git is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;; General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with Guile-Git. If not, see <http://www.gnu.org/licenses/>. + (define-module (tests reference) #:use-module (srfi srfi-64)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guile-git-v0.1.0/tests/remote.scm new/guile-git-v0.2.0/tests/remote.scm --- old/guile-git-v0.1.0/tests/remote.scm 2018-07-01 21:57:15.000000000 +0200 +++ new/guile-git-v0.2.0/tests/remote.scm 2019-01-01 23:13:40.000000000 +0100 @@ -1,3 +1,23 @@ +;;; Guile-Git --- GNU Guile bindings of libgit2 +;;; Copyright © 2017 Mathieu Othacehe <[email protected]> +;;; Copyright © 2017 Erik Edrosa <[email protected]> +;;; Copyright © 2017 Ludovic Courtès <[email protected]> +;;; +;;; This file is part of Guile-Git. +;;; +;;; Guile-Git is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or +;;; (at your option) any later version. +;;; +;;; Guile-Git is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;; General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with Guile-Git. If not, see <http://www.gnu.org/licenses/>. + (define-module (tests remote) #:use-module (srfi srfi-64)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guile-git-v0.1.0/tests/repository.scm new/guile-git-v0.2.0/tests/repository.scm --- old/guile-git-v0.1.0/tests/repository.scm 2018-07-01 21:57:15.000000000 +0200 +++ new/guile-git-v0.2.0/tests/repository.scm 2019-01-01 23:13:40.000000000 +0100 @@ -1,3 +1,23 @@ +;;; Guile-Git --- GNU Guile bindings of libgit2 +;;; Copyright © 2016 Amirouche Boubekki <[email protected]> +;;; Copyright © 2016, 2017 Erik Edrosa <[email protected]> +;;; Copyright © 2017, 2018 Ludovic Courtès <[email protected]> +;;; +;;; This file is part of Guile-Git. +;;; +;;; Guile-Git is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or +;;; (at your option) any later version. +;;; +;;; Guile-Git is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;; General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with Guile-Git. If not, see <http://www.gnu.org/licenses/>. + (define-module (tests repository) #:use-module (git) #:use-module (tests helpers) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guile-git-v0.1.0/tests/reset.scm new/guile-git-v0.2.0/tests/reset.scm --- old/guile-git-v0.1.0/tests/reset.scm 2018-07-01 21:57:15.000000000 +0200 +++ new/guile-git-v0.2.0/tests/reset.scm 2019-01-01 23:13:40.000000000 +0100 @@ -1,3 +1,22 @@ +;;; Guile-Git --- GNU Guile bindings of libgit2 +;;; Copyright © 2017 Mathieu Othacehe <[email protected]> +;;; Copyright © 2017 Erik Edrosa <[email protected]> +;;; +;;; This file is part of Guile-Git. +;;; +;;; Guile-Git is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or +;;; (at your option) any later version. +;;; +;;; Guile-Git is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;; General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with Guile-Git. If not, see <http://www.gnu.org/licenses/>. + (define-module (tests reset) #:use-module (srfi srfi-64)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guile-git-v0.1.0/tests/rev-parse.scm new/guile-git-v0.2.0/tests/rev-parse.scm --- old/guile-git-v0.1.0/tests/rev-parse.scm 2018-07-01 21:57:15.000000000 +0200 +++ new/guile-git-v0.2.0/tests/rev-parse.scm 2019-01-01 23:13:40.000000000 +0100 @@ -1,3 +1,21 @@ +;;; Guile-Git --- GNU Guile bindings of libgit2 +;;; Copyright © 2017 Mathieu Othacehe <[email protected]> +;;; +;;; This file is part of Guile-Git. +;;; +;;; Guile-Git is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or +;;; (at your option) any later version. +;;; +;;; Guile-Git is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;; General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with Guile-Git. If not, see <http://www.gnu.org/licenses/>. + (define-module (tests rev-parse) #:use-module (srfi srfi-64)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guile-git-v0.1.0/tests/status.scm new/guile-git-v0.2.0/tests/status.scm --- old/guile-git-v0.1.0/tests/status.scm 2018-07-01 21:57:15.000000000 +0200 +++ new/guile-git-v0.2.0/tests/status.scm 2019-01-01 23:13:40.000000000 +0100 @@ -1,3 +1,22 @@ +;;; Guile-Git --- GNU Guile bindings of libgit2 +;;; Copyright © 2017 Mathieu Othacehe <[email protected]> +;;; Copyright © 2017 Erik Edrosa <[email protected]> +;;; +;;; This file is part of Guile-Git. +;;; +;;; Guile-Git is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or +;;; (at your option) any later version. +;;; +;;; Guile-Git is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;; General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with Guile-Git. If not, see <http://www.gnu.org/licenses/>. + (define-module (tests status) #:use-module (srfi srfi-64) #:use-module (ice-9 match)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guile-git-v0.1.0/tests/submodule.scm new/guile-git-v0.2.0/tests/submodule.scm --- old/guile-git-v0.1.0/tests/submodule.scm 1970-01-01 01:00:00.000000000 +0100 +++ new/guile-git-v0.2.0/tests/submodule.scm 2019-01-01 23:13:40.000000000 +0100 @@ -0,0 +1,85 @@ +;;; Guile-Git --- GNU Guile bindings of libgit2 +;;; Copyright © 2018 Ludovic Courtès <[email protected]> +;;; +;;; This file is part of Guile-Git. +;;; +;;; Guile-Git is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or +;;; (at your option) any later version. +;;; +;;; Guile-Git is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;; General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with Guile-Git. If not, see <http://www.gnu.org/licenses/>. + +(define-module (tests submodule) + #:use-module (tests helpers) + #:use-module (git) + #:use-module (srfi srfi-64)) + + +(test-begin "submodule") + +(libgit2-init!) + +(with-repository "simple" directory + + (test-equal "repository-submodules, empty" + '() + (repository-submodules (repository-open directory))) + + (test-equal "lookup-submodule, not found" + #f + (submodule-lookup (repository-open directory) "does-not-exist")) + + (test-equal "submodule-add" + '("submod") + ;; Add a submodule, which includes making a checkout of it, and make sure + ;; it is visible. + (let* ((repository (repository-open directory)) + (head (reference-target (repository-head repository))) + (submodule-file (string-append directory "/.gitmodules"))) + (and (not (file-exists? submodule-file)) + (not (file-exists? (string-append directory "/submod"))) + (let* ((url (string-append "file://" + (canonicalize-path directory))) + (submodule (submodule-add-setup repository url "submod")) + (subrepo (repository-open (string-append directory + "/submod")))) + (remote-fetch (remote-lookup subrepo "origin")) + (reset subrepo (object-lookup subrepo head) + RESET_HARD) + (submodule-add-finalize submodule) + (and (file-exists? submodule-file) + (repository-submodules (repository-open directory))))))) + + (test-equal "lookup-submodule" + '("submod" "submod") + (let* ((repository (repository-open directory)) + (submodule (submodule-lookup repository "submod"))) + (and (eq? repository (submodule-owner submodule)) + (list (submodule-name submodule) + (submodule-path submodule))))) + + (test-assert "submodule-update" + (let* ((repository (repository-open directory)) + (head (reference-target (repository-head repository))) + (head^ (commit-id (commit-parent + (commit-lookup repository head)))) + (submodule (submodule-lookup repository "submod")) + (child (repository-open (string-append directory "/submod")))) + ;; Force the sub-repo to HEAD^. + (reset child (object-lookup child head^) RESET_HARD) + (and (oid=? head^ (reference-target (repository-head child))) + (begin + ;; Now update the submodule. + (submodule-update submodule) + (oid=? head (reference-target (repository-head child)))))))) + +(libgit2-shutdown!) + +(test-end) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/guile-git-v0.1.0/tests/tree.scm new/guile-git-v0.2.0/tests/tree.scm --- old/guile-git-v0.1.0/tests/tree.scm 2018-07-01 21:57:15.000000000 +0200 +++ new/guile-git-v0.2.0/tests/tree.scm 2019-01-01 23:13:40.000000000 +0100 @@ -1,3 +1,23 @@ +;;; Guile-Git --- GNU Guile bindings of libgit2 +;;; Copyright © 2016 Amirouche Boubekki <[email protected]> +;;; Copyright © 2017 Erik Edrosa <[email protected]> +;;; Copyright © 2017 Ludovic Courtès <[email protected]> +;;; +;;; This file is part of Guile-Git. +;;; +;;; Guile-Git is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or +;;; (at your option) any later version. +;;; +;;; Guile-Git is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;; General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with Guile-Git. If not, see <http://www.gnu.org/licenses/>. + (define-module (tests tree) #:use-module (srfi srfi-64))
