Skip to content

Commit 96a1493

Browse files
committed
refactor: improve comments in your_program.sh for clarity and accuracy
1 parent c475b18 commit 96a1493

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

internal/test_helpers/pass_all/your_program.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22

3-
# Check if git is working in PATH first
3+
# Check if git from PATH is working first
44
if command -v git >/dev/null 2>&1; then
55
if [ "$1" = "write-tree" ]; then
66
git add .
@@ -11,11 +11,12 @@ fi
1111
# Find git binary in /tmp locations
1212
for tmpdir in /tmp/git-*/git; do
1313
if [ -x "$tmpdir" ]; then
14+
# If defaultBranch config is not set, we set it to main (doesn't work without global config)
1415
if ! "$tmpdir" config --global --get init.defaultBranch >/dev/null 2>&1; then
1516
"$tmpdir" config --global init.defaultBranch main
1617
fi
1718

18-
# commit-tree stage doesn't use call this script for init
19+
# commit-tree stage doesn't use this script for init
1920
# So we need to run this setup again
2021
if [ "$1" = "commit-tree" ]; then
2122
"$tmpdir" config --local user.email "hello@codecrafters.io"

0 commit comments

Comments
 (0)