]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
build: Remove undesired output from autopull.sh.
authorBruno Haible <bruno@clisp.org>
Tue, 4 Feb 2025 00:44:49 +0000 (01:44 +0100)
committerBruno Haible <bruno@clisp.org>
Tue, 4 Feb 2025 00:44:49 +0000 (01:44 +0100)
* autopull.sh (func_git_clone_shallow): Silence the initial branch hint.

autopull.sh

index 6eecb3d3bd2c15ccc1a356ae41ddd1f0bfdf20b8..87dd47806407fe57fd50233c2e06fce0c0560066 100755 (executable)
@@ -62,7 +62,10 @@ func_git_clone_shallow ()
   # to fetching all commits.
   # REVISION can be a commit id, a tag name, or a branch name.
   mkdir -p "$1"
-  git -C "$1" init
+  # Use a -c option to silence an annoying message
+  # "hint: Using 'master' as the name for the initial branch."
+  # (cf. <https://stackoverflow.com/questions/65524512/>).
+  git -C "$1" -c init.defaultBranch=master init
   git -C "$1" remote add origin "$2"
   if git -C "$1" fetch --depth 1 origin "$3"; then
     # "git fetch" of the specific commit succeeded.