[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#45187: git download defaults to origin/master
From: |
Ludovic Courtès |
Subject: |
bug#45187: git download defaults to origin/master |
Date: |
Sat, 10 Apr 2021 21:33:00 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Hi Kyle,
Kyle Meyer <kyle@kyleam.com> skribis:
> Subject: [PATCH v2] 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.
> ---
> guix/git.scm | 23 ++++++++++++++++-------
> 1 file changed, 16 insertions(+), 7 deletions(-)
Applied, thanks!
Ludo’.