guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/04: guix: git: Set initial branch name for git-fetch.


From: guix-commits
Subject: 01/04: guix: git: Set initial branch name for git-fetch.
Date: Wed, 5 Jul 2023 11:58:21 -0400 (EDT)

efraim pushed a commit to branch master
in repository guix.

commit c7eed71681501afa494e8640c3cdd080cadf8290
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Sun Jun 11 21:52:17 2023 +0300

    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(-)

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")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]