Kyle Meyer cb41c15827
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>
2021-04-10 22:59:52 +02:00
..
2021-03-06 11:41:48 +01:00
2019-12-15 00:34:05 +01:00
2021-01-31 21:49:58 +01:00
2020-07-05 03:15:08 +05:30
2020-10-12 11:28:56 +02:00
2021-01-04 23:54:16 +01:00
2020-07-05 16:07:59 +05:30
2020-12-09 22:25:17 +01:00
2020-04-17 23:36:47 +02:00
2021-01-04 23:54:16 +01:00
2021-01-04 23:54:16 +01:00
2021-03-13 22:51:18 +01:00
2020-12-19 23:25:01 +01:00
2021-03-10 18:01:48 +01:00