From c7eed71681501afa494e8640c3cdd080cadf8290 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 11 Jun 2023 21:52:17 +0300 Subject: 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. --- guix/build/git.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guix') 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") -- cgit v1.2.3