[Bug]: New worktrees fail with "Git output exceeded 1000000 bytes" when git worktree add writes over 1 MB
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 75/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- git, typescript
- Lĩnh vực
- developer-experience, tooling
Hướng nghiên cứu
Bắt đầu tại apps/server, trong src/vcs/GitVcsDriverCore.ts, ở createWorktree và lời gọi executeGitWithStableDiagnostics của nó; so sánh cách xử lý đầu ra với thay đổi về git pull trong #17376. Issue chỉ ra việc xử lý cắt ngắn và các callback tiến trình là khu vực cần điều tra. Xác minh rằng đầu ra quá lớn không còn khiến một lệnh git worktree add thành công bị lỗi và worktree được tạo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
- In any repo, add a
post-checkouthook that prints more than 1 MB (git sends hook stdout to its stderr):printf '#!/bin/sh\nhead -c 1100000 /dev/zero | tr "\\0" x\n' > .git/hooks/post-checkout && chmod +x .git/hooks/post-checkout - Start a new-worktree thread for that project, or call
delegate_taskwithisolation: "worktree".
The hook is a stand-in for any large output during checkout. A focused driver test on main (695f5c99) fails the same way.
Expected behavior
If git worktree add succeeds, the worktree is created and the thread starts. T3 only needs the progress lines from this command, not its full output.
Actual behavior
createWorktree runs git worktree add under the default 1 MB per-stream output cap, without appendTruncationMarker (GitVcsDriverCore.ts, createWorktree → executeGitWithStableDiagnostics). Once stderr passes 1 MB, the command fails and git is stopped partway through:
Workspace preparation failed during provision worktree: Git command failed in GitVcsDriver.createWorktree (<repo>): Git output exceeded 1000000 bytes and was truncated.
The failed attempt's t3/… branch is left behind.
We hit this in a repo with about 85,000 tracked files and 12,000 Git LFS objects. Two delegate_task worktree launches started 19 s apart from the same commit; one failed this way after about 230 s, and the other succeeded. Checkout progress (GIT_PROGRESS_DELAY=0) isn't the cause: piped stderr from git worktree add measured about 4.4 KB in that repo. We couldn't identify what went over 1 MB, because the output isn't logged. Anything that writes to git's stderr during checkout counts, including hooks, filter drivers such as git-lfs, and per-file warnings.
Impact
Minor bug or occasional failure
Version or commit
Desktop 0.1.1 (same createWorktree as main @ 695f5c99)
Environment
macOS (Darwin 25.6), Apple git 2.50.1, git-lfs 3.5.1
Logs or stack traces
GitCommandError: Git command failed in GitVcsDriver.createWorktree (…): Git output exceeded 1000000 bytes and was truncated.
❯ src/vcs/GitVcsDriverCore.ts:870:21 (collectOutput)
Screenshots, recordings, or supporting files
No response
Workaround
Delegate with isolation: "shared" and create the worktree manually.
Possible fix (suggestion only)
Do what #17376 did for git pull: run worktree add with appendTruncationMarker: true. Oversized output is then cut off instead of failing a checkout git completed, and the exit code still decides success. Progress updates past the cap would also need keepLineCallbacksAfterTruncation. Related: #17358, #25207, #21635.
- Ngôn ngữ chính
- TypeScript
- Star
- 24.8k
- Fork
- 6.4k
- Merge trung bình
- 4 giờ 29 phút
- Pull request đã merge (30 ngày)
- 305
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của pingdotgg/t3code
-
bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: Sidebar "Failed" badge does not clear when the session is opened (unlike "Done")Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: Assistant message hover timestamp missing while a command is still runningCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 87/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của pingdotgg/t3code
Issue tương tự
-
verified
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Maintainer thường phản hồi trong vòng 5 ngày
-
desktop: directory picker submits home directory instead of typed path when adding a projectĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
anomalyco/opencode#59589 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Bug: During run init command, finish the git initialize process without question to user('Initialize a new git repository?')Có thể đã có người làm @nishu-murmu đã nhận hôm nay. Đang mởpending-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
wxt-dev/wxt#2697 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
knaw-huc/textannoviz#739 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
DEV: partitioner only creates next month, so one failed run leaves a month with no partitionĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày