How exactly use IndexEntry
オープン
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 1.7k
- フォーク
- 408
- 平均マージ
- 2日 57分
- マージ済み PR(30日)
- 7
説明
Trying adding file with IndexEntry, this my way:
id = repo.create_blob('foo bar')
entry = pygit2.IndexEntry('zend2.txt', id, pygit2.GIT_FILEMODE_BLOB_EXECUTABLE)
repo.index.add(entry)
repo.index.write()
But with git status return this.
On branch master
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: zend2.txt
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
deleted: zend2.txt
How to add that blob to staged index.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Issue に示されている IndexEntry の例と repo.index.add/write の呼び出しから始め、インデックスの状態を表示された git status の出力と比較します。作成した blob を正しく stage する方法を文書化または検証し、git status が意図した staged ファイルだけを報告することで完了を示します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- git, python
- 領域
- devtools
- issue の種類
- ドキュメント
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100