GNU bug report logs -
#64009
[PATCH] guix: git: Set initial branch name for git-fetch.
Previous Next
Reported by: Efraim Flashner <efraim <at> flashner.co.il>
Date: Sun, 11 Jun 2023 18:55:02 UTC
Severity: normal
Tags: patch
Done: Efraim Flashner <efraim <at> flashner.co.il>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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 <at> 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
This bug report was last modified 1 year and 324 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.