GitError raised on parsing a diff that has a filename with spaces
オープン
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 1.7k
- フォーク
- 408
- 平均マージ
- 2日 57分
- マージ済み PR(30日)
- 7
説明
This was raised originally at cpp-linter/cpp-linter-action#178 in which a large diff was parsed by pygit2.Diff.parse_diff() (on ubuntu-latset CI github runner).
The error says:
pygit2.GitError: trailing data at line 3734
Here's the full diff: full_pr.diff.txt which was generated by github with the URL https://github.com/edunad/rawrbox/pull/108.diff
Line 3734 is
rename from render/content/fonts/SIL Open Font License.txt
I was able to reproduce this error locally on Windows. Is this expected behavior?
If I remove the spaces from the file name or put the entire path in quotes, then the diff is parsed without problem.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
pygit2.Diff.parse_diff() から始め、添付された full_pr.diff.txt を使って失敗を再現し、3734 行目とスペースを含むファイル名に焦点を当ててください。提供された diff が、ファイル名を変更したり引用符で囲んだりする必要なく正常に解析できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- git, python
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100