GitError raised on parsing a diff that has a filename with spaces
まだ誰も着手していません。
評価
調査の方向性
pygit2.Diff.parse_diff() から始め、添付された full_pr.diff.txt を使って失敗を再現し、3734 行目とスペースを含むファイル名に焦点を当ててください。提供された diff が、ファイル名を変更したり引用符で囲んだりする必要なく正常に解析できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Python
- スター
- 1.7k
- フォーク
- 408
- 平均マージ
- 2日 57分
- マージ済み PR(30日)
- 7
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
libgit2/pygit2 のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
似ている issue
-
link-check link-check:sphinx-theme
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
qgis/QGIS-Documentation#11275 ·
-
bug priority:normal ready-for-dev
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
OpenHands/extensions#626 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
CSCfi/sd-search-api#39 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100