libgit2 / libgit2/libgit2sharp
option to not update submodules when doing checkout
還沒有人認領這個 Issue。
- 主要語言
- C#
- 星號
- 3.5k
- 分支
- 925
- PR 合併指標
- 30 天內沒有已合併 PR
描述
it seems to be a known issue that, at least when there are numerous binary files in a submodule, the submodule update process takes much longer than specifically checking out each submodule. I am, using libgit2sharp to do these checkouts, but the checkout on the superproject takes much longer (~5 sec for super vs <0.1sec for each submodule).
It looks like Commands.Checkout is, effectively, running:
git checkout [sha]
git submodule update --recursive -f
or something like it, but I just want the first line, not both. Is there some repositoryOption or CheckoutOption or something I can use to use it like this?
my usage of ligit2sharp is:
using (Repository repo = new Repository(filePath))
{
//logging and timing
Commands.Checkout(
repo,
commit,
new CheckoutOptions() { CheckoutModifiers = CheckoutModifiers.Force }
);
//logging and timing
}
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從 issue 中所示的 Commands.Checkout、CheckoutOptions 和 CheckoutModifiers 型別開始,接著追蹤子模組更新在哪裡被觸發。驗證 checkout 行為,並找出如何透過一個選項抑制該更新;完成的標準是 checkout 可以跳過子模組更新,同時預設保留現有行為,並為新選項加入涵蓋測試。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- csharp, git
- 領域
- tooling
- Issue 類型
- 功能
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100