diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2023-06-11 21:52:17 +0300 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2023-07-05 18:57:29 +0300 |
commit | c7eed71681501afa494e8640c3cdd080cadf8290 (patch) | |
tree | 2ced4840ae1342eb360bbf959de19ef99b34468b /guix | |
parent | a00e1ee3104936a46ab71507cc6287bbbe4dfa99 (diff) |
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.
Diffstat (limited to 'guix')
-rw-r--r-- | guix/build/git.scm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/guix/build/git.scm b/guix/build/git.scm index 669e38cd32..deda10fee8 100644 --- a/guix/build/git.scm +++ b/guix/build/git.scm @@ -52,7 +52,7 @@ recursively. Return #t on success, #f otherwise." (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") |