libgit2 / libgit2/libgit2sharp

option to not update submodules when doing checkout

オープン
#1,494 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
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
}

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

issue に示されている Commands.Checkout、CheckoutOptions、CheckoutModifiers 型から始め、次にサブモジュールの更新がどこでトリガーされるかを追跡してください。checkout の動作を確認し、その更新を抑制できるオプションの方法を特定してください。新しいオプションによって checkout がサブモジュールの更新をスキップでき、デフォルトでは既存の動作が維持され、さらに新しいオプションのカバレッジがある状態を完了とします。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
csharp, git
領域
tooling
issue の種類
機能追加
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
42/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。