GNU bug report logs -
#45187
git download defaults to origin/master
Previous Next
Full log
Message #20 received at 45187 <at> debbugs.gnu.org (full text, mbox):
Hi,
Kyle Meyer <kyle <at> kyleam.com> skribis:
> diff --git a/guix/git.scm b/guix/git.scm
> index ca77b9f54b..7320c0d6c8 100644
> --- a/guix/git.scm
> +++ b/guix/git.scm
> @@ -207,6 +207,9 @@ (define (resolve-reference repository ref)
> (let ((oid (reference-target
> (branch-lookup repository branch BRANCH-REMOTE))))
> (object-lookup repository oid)))
> + (('symref . symref)
> + (let ((oid (reference-name->oid repository symref)))
> + (object-lookup repository oid)))
> (('commit . commit)
> (let ((len (string-length commit)))
> ;; 'object-lookup-prefix' appeared in Guile-Git in Mar. 2018, so we
> @@ -320,7 +323,7 @@ (define (reference-available? repository ref)
>
> (define* (update-cached-checkout url
> #:key
> - (ref '(branch . "master"))
> + (ref '(symref . "refs/remotes/origin/HEAD"))
> recursive?
> (check-out? #t)
> starting-commit
> @@ -395,7 +398,7 @@ (define* (latest-repository-commit store url
> (log-port (%make-void-port "w"))
> (cache-directory
> (%repository-cache-directory))
> - (ref '(branch . "master")))
> + (ref '(symref . "refs/remotes/origin/HEAD")))
Do we really need to add “remotes/origin” in there? Or is there a way
to just say HEAD and later specify that we’re talking about the remote
head, as is done fro branches?
We also need to change the defaults in <git-checkout> & co., like Marius did.
Thanks,
Ludo’.
This bug report was last modified 4 years and 102 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.