Skip to content

Commit 0259eaa

Browse files
sjarmakclaude
andcommitted
fix: remove git init -b main from 67 Dockerfile.sg_only/artifact_only files
The -b flag requires git >= 2.28 and unnecessarily reinitializes the existing repo, destroying branch name and history. Replace with the canonical pattern from generate_sgonly_dockerfiles.py: just git add -A && git commit to recommit truncated state. Fixes Docker build failure on images with older git (e.g. the qutebrowser-download MCP error in the ccb_debug Haiku run). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent bca25de commit 0259eaa

File tree

67 files changed

+67
-67
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+67
-67
lines changed

benchmarks/ccb_build/bustub-hyperloglog-impl-001/environment/Dockerfile.sg_only

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ RUN find /workspace -type f \( -name "*.py" -o -name "*.pyx" -o -name "*.pyi" -o
2424
# Recommit truncated state so git history cannot recover full files.
2525
# Without this, `git show HEAD:<file>` or `git checkout HEAD -- <file>`
2626
# would bypass truncation by reading from the pre-truncation commit.
27-
RUN cd /workspace && git init -b main && git config user.email "agent@example.com" && git config user.name "Agent" && git add -A && git commit -m "sg_only truncation" --allow-empty --quiet
27+
RUN cd /workspace && git config user.email "agent@example.com" && git config user.name "Agent" && git add -A && git commit -m "sg_only truncation" --allow-empty --quiet
2828
RUN touch /tmp/.sg_only_mode && echo '/workspace' > /tmp/.sg_only_workdir
2929
CMD ["bash"]

benchmarks/ccb_build/cgen-deps-install-001/environment/Dockerfile.sg_only

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ RUN find /app/repo -type f \( -name "*.py" -o -name "*.pyx" -o -name "*.pyi" -o
2424
# Recommit truncated state so git history cannot recover full files.
2525
# Without this, `git show HEAD:<file>` or `git checkout HEAD -- <file>`
2626
# would bypass truncation by reading from the pre-truncation commit.
27-
RUN cd /app/repo && git init -b main && git config user.email "agent@example.com" && git config user.name "Agent" && git add -A && git commit -m "sg_only truncation" --allow-empty --quiet
27+
RUN cd /app/repo && git config user.email "agent@example.com" && git config user.name "Agent" && git add -A && git commit -m "sg_only truncation" --allow-empty --quiet
2828
RUN touch /tmp/.sg_only_mode && echo '/app/repo' > /tmp/.sg_only_workdir
2929

3030
WORKDIR /app/repo

benchmarks/ccb_build/codecoverage-deps-install-001/environment/Dockerfile.sg_only

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ RUN find /app/repo -type f \( -name "*.py" -o -name "*.pyx" -o -name "*.pyi" -o
2828
# Recommit truncated state so git history cannot recover full files.
2929
# Without this, `git show HEAD:<file>` or `git checkout HEAD -- <file>`
3030
# would bypass truncation by reading from the pre-truncation commit.
31-
RUN cd /app/repo && git init -b main && git config user.email "agent@example.com" && git config user.name "Agent" && git add -A && git commit -m "sg_only truncation" --allow-empty --quiet
31+
RUN cd /app/repo && git config user.email "agent@example.com" && git config user.name "Agent" && git add -A && git commit -m "sg_only truncation" --allow-empty --quiet
3232
RUN touch /tmp/.sg_only_mode && echo '/app/repo' > /tmp/.sg_only_workdir
3333

3434
WORKDIR /app/repo

benchmarks/ccb_build/dotenv-expand-deps-install-001/environment/Dockerfile.sg_only

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ RUN find /app/repo -type f \( -name "*.py" -o -name "*.pyx" -o -name "*.pyi" -o
2626
# Recommit truncated state so git history cannot recover full files.
2727
# Without this, `git show HEAD:<file>` or `git checkout HEAD -- <file>`
2828
# would bypass truncation by reading from the pre-truncation commit.
29-
RUN cd /app/repo && git init -b main && git config user.email "agent@example.com" && git config user.name "Agent" && git add -A && git commit -m "sg_only truncation" --allow-empty --quiet
29+
RUN cd /app/repo && git config user.email "agent@example.com" && git config user.name "Agent" && git add -A && git commit -m "sg_only truncation" --allow-empty --quiet
3030
RUN touch /tmp/.sg_only_mode && echo '/app/repo' > /tmp/.sg_only_workdir
3131

3232
WORKDIR /app/repo

benchmarks/ccb_build/dotnetkoans-deps-install-001/environment/Dockerfile.sg_only

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ RUN find /app/repo -type f \( -name "*.py" -o -name "*.pyx" -o -name "*.pyi" -o
2828
# Recommit truncated state so git history cannot recover full files.
2929
# Without this, `git show HEAD:<file>` or `git checkout HEAD -- <file>`
3030
# would bypass truncation by reading from the pre-truncation commit.
31-
RUN cd /app/repo && git init -b main && git config user.email "agent@example.com" && git config user.name "Agent" && git add -A && git commit -m "sg_only truncation" --allow-empty --quiet
31+
RUN cd /app/repo && git config user.email "agent@example.com" && git config user.name "Agent" && git add -A && git commit -m "sg_only truncation" --allow-empty --quiet
3232
RUN touch /tmp/.sg_only_mode && echo '/app/repo' > /tmp/.sg_only_workdir
3333

3434
WORKDIR /app/repo

benchmarks/ccb_build/envoy-grpc-server-impl-001/environment/Dockerfile.sg_only

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ RUN find /workspace -type f \( -name "*.py" -o -name "*.pyx" -o -name "*.pyi" -o
4343
# Recommit truncated state so git history cannot recover full files.
4444
# Without this, `git show HEAD:<file>` or `git checkout HEAD -- <file>`
4545
# would bypass truncation by reading from the pre-truncation commit.
46-
RUN cd /workspace && git init -b main && git config user.email "agent@example.com" && git config user.name "Agent" && git add -A && git commit -m "sg_only truncation" --allow-empty --quiet
46+
RUN cd /workspace && git config user.email "agent@example.com" && git config user.name "Agent" && git add -A && git commit -m "sg_only truncation" --allow-empty --quiet
4747
RUN touch /tmp/.sg_only_mode && echo '/workspace' > /tmp/.sg_only_workdir
4848
CMD ["/bin/bash"]

benchmarks/ccb_build/eslint-markdown-deps-install-001/environment/Dockerfile.sg_only

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ RUN find /app/repo -type f \( -name "*.py" -o -name "*.pyx" -o -name "*.pyi" -o
2626
# Recommit truncated state so git history cannot recover full files.
2727
# Without this, `git show HEAD:<file>` or `git checkout HEAD -- <file>`
2828
# would bypass truncation by reading from the pre-truncation commit.
29-
RUN cd /app/repo && git init -b main && git config user.email "agent@example.com" && git config user.name "Agent" && git add -A && git commit -m "sg_only truncation" --allow-empty --quiet
29+
RUN cd /app/repo && git config user.email "agent@example.com" && git config user.name "Agent" && git add -A && git commit -m "sg_only truncation" --allow-empty --quiet
3030
RUN touch /tmp/.sg_only_mode && echo '/app/repo' > /tmp/.sg_only_workdir
3131

3232
WORKDIR /app/repo

benchmarks/ccb_build/iamactionhunter-deps-install-001/environment/Dockerfile.sg_only

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ RUN find /app/repo -type f \( -name "*.py" -o -name "*.pyx" -o -name "*.pyi" -o
2424
# Recommit truncated state so git history cannot recover full files.
2525
# Without this, `git show HEAD:<file>` or `git checkout HEAD -- <file>`
2626
# would bypass truncation by reading from the pre-truncation commit.
27-
RUN cd /app/repo && git init -b main && git config user.email "agent@example.com" && git config user.name "Agent" && git add -A && git commit -m "sg_only truncation" --allow-empty --quiet
27+
RUN cd /app/repo && git config user.email "agent@example.com" && git config user.name "Agent" && git add -A && git commit -m "sg_only truncation" --allow-empty --quiet
2828
RUN touch /tmp/.sg_only_mode && echo '/app/repo' > /tmp/.sg_only_workdir
2929

3030
WORKDIR /app/repo

benchmarks/ccb_build/k8s-runtime-object-impl-001/environment/Dockerfile.sg_only

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ RUN find /workspace -type f \( -name "*.py" -o -name "*.pyx" -o -name "*.pyi" -o
3838
# Recommit truncated state so git history cannot recover full files.
3939
# Without this, `git show HEAD:<file>` or `git checkout HEAD -- <file>`
4040
# would bypass truncation by reading from the pre-truncation commit.
41-
RUN cd /workspace && git init -b main && git config user.email "agent@example.com" && git config user.name "Agent" && git add -A && git commit -m "sg_only truncation" --allow-empty --quiet
41+
RUN cd /workspace && git config user.email "agent@example.com" && git config user.name "Agent" && git add -A && git commit -m "sg_only truncation" --allow-empty --quiet
4242
RUN touch /tmp/.sg_only_mode && echo '/workspace' > /tmp/.sg_only_workdir
4343
CMD ["/bin/bash"]

benchmarks/ccb_build/pcap-parser-deps-install-001/environment/Dockerfile.sg_only

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ RUN find /app/repo -type f \( -name "*.py" -o -name "*.pyx" -o -name "*.pyi" -o
2626
# Recommit truncated state so git history cannot recover full files.
2727
# Without this, `git show HEAD:<file>` or `git checkout HEAD -- <file>`
2828
# would bypass truncation by reading from the pre-truncation commit.
29-
RUN cd /app/repo && git init -b main && git config user.email "agent@example.com" && git config user.name "Agent" && git add -A && git commit -m "sg_only truncation" --allow-empty --quiet
29+
RUN cd /app/repo && git config user.email "agent@example.com" && git config user.name "Agent" && git add -A && git commit -m "sg_only truncation" --allow-empty --quiet
3030
RUN touch /tmp/.sg_only_mode && echo '/app/repo' > /tmp/.sg_only_workdir
3131

3232
WORKDIR /app/repo

0 commit comments

Comments
 (0)