Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

git-sizer can fail on some very long lines

未關閉
#157 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

@simonkundrik 已經在處理了。

開始於 2026年7月6日。

  • #158 來自 @simonkundrik —— 未關閉

評估

難度
3/5
預估耗時
1-2 天
新手友好度
45/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
git, go
領域
cli, devtools

研究方向

首先,針對一個 git rev-list --objects 輸出包含極長行的儲存庫,使用 git-sizer --verbose 重現此故障。追蹤該輸出的讀取方式,並定義適當的處理方式,例如回報受影響的物件 ID;完成後應避免發生 bufio.Scanner: token too long 故障,並以測試涵蓋長行情況。

由索引模型根據 Issue 內容生成。

描述

On some repositories, we can get the following error:

% git-sizer --verbose
error: error scanning repository: copy-oids: bufio.Scanner: token too long

It appears that one of the lines from git rev-list --objects is too long to be read. In the (private) repository instance we saw, the line was 12583034 bytes in size. It is speculated that this is due to a very long filename or path.

git-sizer should handle this more gracefully, if only by printing the affected object ID. Perhaps an option could also be added to adjust the buffer size so that normally git-sizer would use fewer resources but it could be adjusted to deal with larger lines if need be.

主要語言
Go
星號
4.1k
分支
202
PR 合併指標
30 天內沒有已合併 PR

環境準備

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

github/git-sizer 的其他 Issue

查看 github/git-sizer 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。