how to diff one file in working dir against a Blob?
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 1.7k
- フォーク
- 408
- 平均マージ
- 2日 57分
- マージ済み PR(30日)
- 7
説明
pygit2 version python3-pygit2-0.23.3-2.fc23.x86_64
I cannot figure out how I can get a diff for only one file.
How do I arrange to have pygit2 return the diff of a Blob against the working dir file?
I looked at calling diff_to_working on a new Index(), but that fails because the new Index() does not
self._repo filled in.
TreeBuilder() seems is unable to help as it requires putting tree objects into the repo to allow
for the folder structure, for example to diff Source/file.py. needs a tree for Source. I clearly
do not want to be writting files into the repo to do a diff.
Did I miss something in API?
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、issue で言及されている diff_to_working API と Index API、および pygit2 が Blob と作業ディレクトリのファイルをどのように表現するかを確認します。リポジトリのツリーオブジェクトを作成せずにこの比較をサポートする既存の API があるかどうかを判断します。単一の Blob と作業ツリーの diff に対応するパスを特定または指定できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- git, python
- 領域
- devtools
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100