mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
guix: git: Set initial branch name for git-fetch.
This removes the 'hint' about choosing a branch name when creating a new git repository. * guix/build/git.scm (git-fetch): When running 'git init' add an initial branch name.
This commit is contained in:
parent
a00e1ee310
commit
c7eed71681
1 changed files with 1 additions and 1 deletions
|
@ -52,7 +52,7 @@ (define* (git-fetch url commit directory
|
|||
(delete-file-recursively directory)
|
||||
#f))
|
||||
(with-directory-excursion directory
|
||||
(invoke git-command "init")
|
||||
(invoke git-command "init" "--initial-branch=main")
|
||||
(invoke git-command "remote" "add" "origin" url)
|
||||
(if (zero? (system* git-command "fetch" "--depth" "1" "origin" commit))
|
||||
(invoke git-command "checkout" "FETCH_HEAD")
|
||||
|
|
Loading…
Reference in a new issue