unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#64009] [PATCH] guix: git: Set initial branch name for git-fetch.
@ 2023-06-11 18:54 Efraim Flashner
       [not found] ` <handler.64009.B.168650966314703.ack@debbugs.gnu.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Efraim Flashner @ 2023-06-11 18:54 UTC (permalink / raw)
  To: 64009; +Cc: Efraim Flashner

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

base-commit: 73fa2889895f35bcf0c41f1174413381fdd7ec2c
-- 
Efraim Flashner   <efraim@flashner.co.il>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted





^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-07-06 13:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-11 18:54 [bug#64009] [PATCH] guix: git: Set initial branch name for git-fetch Efraim Flashner
     [not found] ` <handler.64009.B.168650966314703.ack@debbugs.gnu.org>
2023-07-06 13:21   ` bug#64009: Acknowledgement ([PATCH] guix: git: Set initial branch name for git-fetch.) Efraim Flashner

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).