Skip to content

Commit

Permalink
Makefile: set default branch when initializing git
Browse files Browse the repository at this point in the history
This should suppress these hints printed during build:

    hint: Using 'master' as the name for the initial branch. This default branch name
    hint: is subject to change. To configure the initial branch name to use in all
    hint: of your new repositories, which will suppress this warning, call:
    hint:
    hint: 	git config --global init.defaultBranch <name>
    hint:
    hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
    hint: 'development'. The just-created branch can be renamed via this command:
    hint:
    hint: 	git branch -m <name>

Signed-off-by: Sebastiaan van Stijn <[email protected]>
  • Loading branch information
thaJeztah committed Jun 12, 2024
1 parent 35071f9 commit 891b7a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ src/github.com/opencontainers/runc:
cp -r "$(RUNC_DIR)" $@
else
src/github.com/opencontainers/runc:
git init $@
git init --initial-branch=main $@
git -C $@ remote add origin "$(RUNC_REMOTE)"
endif

Expand All @@ -57,7 +57,7 @@ src/github.com/containerd/containerd:
cp -r "$(CONTAINERD_DIR)" $@
else
src/github.com/containerd/containerd:
git init $@
git init --initial-branch=main $@
git -C $@ remote add origin "$(CONTAINERD_REMOTE)"
endif

Expand Down
2 changes: 1 addition & 1 deletion Makefile.win
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ src/github.com/containerd/containerd:
Xcopy /E /I "$(CONTAINERD_DIR)" $@
else
src/github.com/containerd/containerd:
git init $@
git init --initial-branch=main $@
git -C $@ remote add origin "$(CONTAINERD_REMOTE)"
endif

Expand Down

0 comments on commit 891b7a6

Please sign in to comment.