diff options
author | Kyle Meyer <kyle@kyleam.com> | 2021-04-09 23:50:13 -0400 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2021-04-10 22:59:52 +0200 |
commit | cb41c15827a2e910aa56fb5d1917ba8a085c95c7 (patch) | |
tree | 7bddca672e5e0e7625069d2f90bec1d20df970c8 /gnu | |
parent | d7e57e2a5bad55415551fc2c53552142c32056d5 (diff) |
git: Update cached checkout to the remote HEAD by default.
Fixes <https://bugs.gnu.org/45187>.
Reported by Ricardo Wurmus <rekado@elephly.net>.
update-cached-checkout hard codes "master" as the default branch, leading to a
failure when the clone doesn't have a "master" branch. Instead use the remote
HEAD symref as an indicator of what the primary branch is.
* guix/git.scm (resolve-reference): Support resolving symrefs.
(update-cached-checkout, latest-repository-commit): Change the default for REF
to the empty list and translate it to the remote HEAD symref.
(<git-checkout>): Change branch field's default to #f.
(git-checkout-compiler): When branch and commit fields are both #f, call
latest-repository-commit* with the empty list as the ref.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu')
0 files changed, 0 insertions, 0 deletions