                             -*- org -*-
#+TITLE: Guile-Git NEWS - history of user-visible changes


Copyright © 2018, 2019, 2020 Erik Edrosa
Copyright © 2021, 2024-2026 Ludovic Courtès
Copyright © 2025 Nicolas Graves

  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.11.1 (since 0.11.0)

** Bug fixes

*** Prevent garbage collection of several objects during clone
    (<https://codeberg.org/guix/guix/issues/4989>)

*** Fix =diff-hunk-header= to actually return the header
    (<https://codeberg.org/guile-git/guile-git/pulls/82>)

* Changes in 0.11.0 (since 0.10.0)

** New functionality

*** New =(git apply)= module

This module provides facilities to apply patches:

  - ~apply-diff~ to apply patches to a checkout
  - ~apply-diff-to-tree~ to apply patches to a repository tree

*** New =(git stash)= module

This lets you work with “stashes”:

  - ~stash-save~ to save local modifications to a stash
  - ~stash-apply~ to apply a previously-save stash
  - ~stash-foreach~ to iterate on stashes
  - ~stash-drop~ to drop a stash
  - ~stash-pop~ to pop a stash (applying it and dropping it)

*** New procedures in =(git reference)=

The following procedures were added:

  - ~reference-create~ to create a reference
  - ~reference-symbolic-create~ to create, well, a symbolic reference
    (or “symref”)

** Support for =(srfi srfi-64)= as found in Guile 3.0.11

* Changes in 0.10.0 (since 0.9.0)

** New functionality

*** New =(git revwalker)= module

A new module provides revision walking functionality, allowing you to traverse
commit histories. It includes these procedures:

  - ~revwalk-new~ to create a new revision walker for a repository;
  - ~revwalk-push!~ and ~revwalk-hide!~ to mark commits to include or exclude;
  - ~revwalk-push-range!~ to specify commit ranges to traverse;
  - ~revwalk-next!~ to iterate through commits;
  - ~revwalk-reset!~ to clear the walker's state.

*** New =(git notes)= module

Support for Git notes has been added through these procedures:

  - ~note-create~ to add new notes to commits;
  - ~note-read~ to retrieve notes for commits;
  - ~note-message~ to get the content of a note;
  - ~note-author~ and ~note-committer~ to access signature information;
  - ~note-id~ to get the note's object ID.

*** New =(git graph)= module

This modules provides two procedures to query the commit graph:

  - ~graph-ahead-behind~ returns the “distance” between two commits;
  - ~graph-descendant?~ determines whether a commit is a descendant of
    another commit.

*** =remote-fetch= now accepts a =#:refspecs= argument

This lets you specify a list of “refspecs” to be fetched such as
=refs/pull/1=.

*** New procedures under =(git submodules)=

The following procedures were added: ~submodule-url~,
~submodule-branch~, and ~submodule-wd-id~.

** Support for libgit2 1.9.x added

* Changes in 0.9.0 (since 0.8.0)

** New functionality

*** New procedures in =(git settings)=

Connection timeouts can now be queried with ~server-connection-timeout~
and ~server-timeout~, and configured with ~set-server-timeout!~ and
~set-server-connection-timeout!~.  Note that these have no effect when
using libgit2 < 1.7.

Other new procedures to set global options include:

  - ~user-agent~ and ~set-user-agent!~;
  - ~user-agent-product~ and ~set-user-agent-product!~;
  - ~home-directory~ and ~set-home-directory!~.

These procedures throw an exception when the underlying libgit2 is too
old and does not support them.

* Changes in 0.8.0 (since 0.7.0)

** New functionality

*** New procedures in =(git config)=

The module mow provides ~config-entry-backend-type~ and
~config-entry-origin-path~ which return, respectively, the type of
backend the config entry comes from and the name of the file it appears
in.  This functionality requires libgit2 1.8 or later.

** Support for libgit2 1.8 added

** Support for Guile 2.0 dropped

* Changes in 0.7.0 (since 0.6.0)

** New functionality

*** New procedures in =(git config)=

The module now provides new procedures: ~set-config-string~,
~set-config-integer~, and ~set-config-boolean~ to modify or add
key/value pairs to a repository’s configuration file.

*** New ~repository-common-directory~ procedure

This procedure returns the shared common directory of a repository—the
one that contains the ~.git~ directory, in the presence of worktrees.

* Changes in 0.6.0 (since 0.5.2)

** Updated requirements

Guile-Git now requires libgit2 >= 1.3.0.

** New functionality

*** Support libgit2 up to 1.7.x

*** Support for checkout options

Checkout options can be created with ~make-checkout-options~ and passed
to ~checkout-head~, ~checkout-index~, etc.

*** New ~remote-connect/detached~ procedure

Lets you connect to a detached remote.

*** New ~(git ignore)~ module and ~ignored-file?~  procedure

The ~ignored-file?~ returns true when a file is ignored according to the
ignore rules.

*** New ~owner-validation?~ and ~set-owner-validation!~ procedures

These procedures let you query and set repository directory ownership
validation, which raises an error when attempting to access a repository
not owned by the current user.

*** New ~describe-checkout~ procedure

The procedure returns a pretty description of a checkout, similar to
the ~git describe~ command.

** Bug fixes

*** Always use native endianness when interpreting ~size_t~ pointers
   (<https://codeberg.org/guile-git/guile-git/issues/20>)

*** Add missing argument to C call made by ~repository-index~

*** Clone-over-SSH tests now ignores =~/.ssh/known_hosts= validation
   (<https://codeberg.org/guile-git/guile-git/issues/29>)

*** Fix various binary interface incompatibility issues

Running ~make check-abi~ now flags application binary interface (ABI)
issues.

* Changes in 0.5.2 (since 0.5.1)

** Bug fix

*** Fix crash when fetching multiple sub-modules

This bug was reported at <https://issues.guix.gnu.org/48855>.  It could
lead to crashes via SIGSEGV or SIGILL while fetching multiple
sub-modules in a row.

* Changes in 0.5.1 (since 0.5.0)

** Bug fix

*** Fix crash when using ‘config-foreach’ or ‘config-fold’

This bug was reported at <https://issues.guix.gnu.org/47808>.  It could
lead to segmentation faults in ~tests/config.scm~ while running ~make
check~.

* Changes in 0.5.0 (since 0.4.0)

** New functionality

*** New diff bindings in (git diff)

These bindings allow you to compute and print a diff between two
different trees.

*** New configuration parsing support in (git config)

This new module provides an interface to obtain configuration value as
you would do on with the ~git config~ command.

As a corollary, it introduces an incompatible change: the internal
module previously known as ~(git config)~ has been renamed to
~(git configuration)~.  It is not meant to be used directly by
applications though, so you should not notice it.

*** New tag procedures: ‘tag-fold’, ‘tag-foreach’

*** New tree procedures: ‘tree-entry-byname’, ‘tree-entry-type’

*** New remote procedures: ‘remote-url’, ‘remote-set-url!’

*** Submodule interface changes

The ~submodule-update~ procedure accepts the new ~#:allow-fetch?~ and
~#:fetch-options~ arguments.  The latter allows you to specify “fetch
options”, such as the URL of an HTTP/HTTPS proxy.

There’s also a new ~submodule-set-url!~ procedure.

** Bug fixes

*** commit: Prevent dangling repository references
    https://codeberg.org/guile-git/guile-git/issues/21

*** Fix “make check” for tests involving SSH


* Changes in 0.4.0 (since 0.3.0)

** New Functionality

*** Support for HTTP and HTTPS proxies

One can now specify the HTTP and HTTPS via the ~#:proxy-url~ parameter
of ~make-fetch-options~.  Those fetch options must then be passed to
~fetch~, or they can be added to the clone options passed to ~clone~.

*** Support for progress report

Clones and fetches can take some time and you may want to tell users
what’s going on.  To help with that, ~make-fetch-options~ now takes a
~#:transfer-progress~ option; it should be either ~#f~ or a one-argument
procedure that will be called with an ~<indexer-progress>~ record every
time progress is made.  This record contains information about the total
number of objects being processed, the number of objects already
retrieved, and the number of objects already indexed.

** Bug Fixes

*** Fix typo that made ~repository-index~ and ~repository-refdb~ unusable


* Changes in 0.3.0 (since 0.2.0)

** New Functionality

*** Add new (git tag) procedures

Four new procedures were added to (git tag) related to creating tags
in a git repository.

~tag-create~ and ~tag-create!~ are used to create what is known as
"annotated" tags in git which contain a creation date, creator's
signature, and a message. The ~tag-create!~ procedure can replace
existing references with the same name.

~tag-create-lightweight~ and ~tag-create-lightweight!~ are used to
create lightweight tags in git which just create a reference that
points directly to a git object.

*** Add (git signature) module

The (git signature) module adds three new procedures related to
signatures. Signatures are objects which identify a name, email, and
time that are found on many git objects. You would need to create a
signature if you want to use the ~tag-create~ procedure mentioned
above.

~signature-default~ creates a signature by looking up the ~user.name~
and ~user.email~ from the repository's configuration. It also uses the
current time.

~signature-new~ creates a signature with the passed in name, email,
time and timezone offset.

~signature-now~ creates a signature with the passed in name and
email. The time will use the current time.


*** Add (git describe) module

The (git describe) module adds several new procedures used to create
human readable names for objects based on an available references.

*** Support for Guile 3.0

Upgrade the configure script to be able to find Guile 3.0.

*** Add accessor and setter for the download tags of ~fetch-options~

The (git structs) module has added ~fetch-options-download-tags~ and
~set-fetch-options-download-tags!~ procedures for accessing and
setting the download tags field of ~fetch-options~. This field
determines the tag download policy when fetching from a remote.

*** Add ~CREDTYPE-*~ variables

(git cred) module has added several new variables which are used to
represent a bitmask for the supported credential types.

*** Add ssh authentication support

Add ssh auth support to ~clone~ and ~remote-fetch~ procedures with an
authentication method from the new module (git auth).

*** Add (git blob) module

(git blob) module adds several procedures for accessing and
interacting with blobs.

** Changes

*** ~repository-state~ return a symbols instead of an int

The ~repository-state~ procedure used to return an integer to
represent a state like none, merge, revert. It now returns the
following symbols based on the state of the repository

    - ~repository-state/none~
    - ~repository-state/merge~
    - ~repository-state/revert~
    - ~repository-state/revert-sequence~
    - ~repository-state/cherrypick~
    - ~repository-state/cherrypick-sequence~
    - ~repository-state/bisect~
    - ~repository-state/rebase~
    - ~repository-state/rebase-interactive~
    - ~repository-state/rebase-merge~
    - ~repository-state/apply-mailbox~
    - ~repository-state/apply-mailbox-or-rebase~

*** Rename ~foo-init-options~ procedures to be more idiomatic

Several procedures named like ~foo-init-options~ were renamed to be
more idiomatic like ~make-foo-options~. The previous functions are
deprecated and will be removed in a future version of Guile Git. The
functions renamed are:

    - ~clone-init-options~ renamed to ~make-clone-options~
    - ~fetch-init-options~ renamed to ~make-fetch-options~
    - ~status-init-options~ renamed to ~make-status-options~

** Bug Fixes

* 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~.
