From: Efraim Flashner <efraim@flashner.co.il>
To: 64009@debbugs.gnu.org
Cc: Efraim Flashner <efraim@flashner.co.il>
Subject: [bug#64009] [PATCH] guix: git: Set initial branch name for git-fetch.
Date: Sun, 11 Jun 2023 21:54:12 +0300 [thread overview]
Message-ID: <d602a82c542d34aa91ea39cde9bda16a713c059c.1686509642.git.efraim@flashner.co.il> (raw)
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
next reply other threads:[~2023-06-11 18:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-11 18:54 Efraim Flashner [this message]
[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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d602a82c542d34aa91ea39cde9bda16a713c059c.1686509642.git.efraim@flashner.co.il \
--to=efraim@flashner.co.il \
--cc=64009@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.