GOTCHA: Sometimes len(pygit2.Repository().index) > 0 !
オープン
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 1.7k
- フォーク
- 408
- 平均マージ
- 2日 57分
- マージ済み PR(30日)
- 7
説明
Python 3.10.6 (main, Aug 10 2022, 11:40:04) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygit2
>>> len(pygit2.Repository().index)
2
>>> for item in pygit2.Repository().index: print(item)
...
<path=aaaa id=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 mode=33188>
<path=bbbb id=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 mode=33188>
>>> pygit2.__version__
'1.10.1'
This really surprised me, and I spent over 2 hours wondering why my code did not work before I thought maybe there's a bug.
With hindsight, I think it will be easy to reproduce. Ask me if you want help with this.
I will use index.clear() as a work-around.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、Python 3.10.6 と pygit2 1.10.1 を使用して例を再現します。特に、pygit2.Repository().index の呼び出しとそのエントリを確認してください。新しいリポジトリのインデックスに aaaa と bbbb が含まれる理由を追跡し、続いて空のインデックスで意図されている動作を確立し、リグレッションカバレッジで修正を検証してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- git, python
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 30/100