diff options
| author | tv <tv@krebsco.de> | 2026-11-27 21:05:18 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-27 21:05:18 +0000 |
| commit | 1098d568b36adebdf52bf0f11420e6ec03e88c2c (patch) | |
| tree | 39f7dca811e4b311c4e5a37a425c0250aff49cce /pkgs/populate/src/sh.rs | |
| parent | 02ea323bb65d95dedf1af927151fc487452d734f (diff) | |
git init, which makes the repository of a shallow clone, advises at
length to choose a name for the initial branch, unless
init.defaultBranch is set. Setting it for git init alone keeps that
quiet, and out of the repository's configuration.
Diffstat (limited to 'pkgs/populate/src/sh.rs')
| -rw-r--r-- | pkgs/populate/src/sh.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/populate/src/sh.rs b/pkgs/populate/src/sh.rs index 1f27b6b..52d41ac 100644 --- a/pkgs/populate/src/sh.rs +++ b/pkgs/populate/src/sh.rs @@ -515,7 +515,9 @@ deliver_git() { if ! test -e "$path"; then changed=1 if test -n "$shallow"; then - git init "$path" + # With a name for the initial branch, so Git doesn't advise to choose + # one. + git -c init.defaultBranch=master init "$path" else git clone --recurse-submodules -- "$url" "$path" fi |
