File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
internal/test_helpers/pass_all Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 1111# Find git binary in /tmp locations
1212for tmpdir in /tmp/git-* /git; do
1313 if [ -x " $tmpdir " ]; then
14+ " $tmpdir " config --global init.defaultBranch main
15+
1416 # commit-tree stage doesn't use call this script for init
1517 # So we need to run this setup again
1618 if [ " $1 " = " commit-tree" ]; then
@@ -22,13 +24,13 @@ for tmpdir in /tmp/git-*/git; do
2224 " $tmpdir " add .
2325 fi
2426
25- if [ " $1 " = " init" ]; then
26- " $tmpdir " " $@ "
27+ if [ " $1 " ! = " init" ]; then
28+ exec " $tmpdir " " $@ "
2729 # If init.defaultBranch is not set, set it to main
2830 # If not set globally, git always shows a warning
29- if ! " $tmpdir " config --global --get init.defaultBranch > /dev/null 2>&1 ; then
30- " $tmpdir " config --global init.defaultBranch main
31- fi
31+ # if ! "$tmpdir" config --global --get init.defaultBranch >/dev/null 2>&1; then
32+ # "$tmpdir" config --global init.defaultBranch main
33+ # fi
3234 # Setup is run locally so it's only set for the current temp repo
3335 " $tmpdir " config --local user.email " hello@codecrafters.io"
3436 " $tmpdir " config --local user.name " CodeCrafters-Bot"
You can’t perform that action at this time.
0 commit comments