Skip to content

Commit 92479a9

Browse files
simonwclaude
andcommitted
Fix git fetch --unshallow on non-shallow clones
Only run git fetch --unshallow if .git/shallow exists, fixing the build failure when the repository is already fully cloned (fetch-depth: 0). Refs: #137 (comment) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent b674890 commit 92479a9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

build.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
set -e
33

44
# Make sure we have the full git history for finding commit dates:
5-
git fetch --unshallow
5+
if [ -f .git/shallow ]; then
6+
git fetch --unshallow
7+
fi
68

79
echo "=== Building tools.simonwillison.net ==="
810

0 commit comments

Comments
 (0)