-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG][v2.7.4] _pygit2.GitError: trailing data at line 3734 #178
Comments
the diff being parsed |
the diff chunk in question is: diff --git a/render/content/fonts/SIL Open Font License.txt b/rawrbox.render/assets/fonts/SIL Open Font License.txt
similarity index 100%
rename from render/content/fonts/SIL Open Font License.txt
rename to rawrbox.render/assets/fonts/SIL Open Font License.txt It looks like pygit2 (python wrapper for libgit2) doesn't like the spaces in this line:
|
My first instinct is to massage the diff before passing it to I'm curious how
|
Here's the git diff of that commit, hope it helps |
@edunad This might take me a while to diagnose and resolve. You can roll back to v2.7.2 as we switched to pygit2 in v2.7.3. Caution Any version before v2.7.3 might not work well with custom docker images. It usually shows as a pip error about installing to "system packages" in Linux... |
Will do, thanks for the quick support! <3 |
I couldn't find that line in a local
The resulting did not add quotes around that line's filename, so the GitError was raised again. I raised this issue upstream at libgit2/pygit2#1260. |
I tried to parse the diff in the rust binding git2-rs and got the same error, so I think this a problem with libgit2 C library itself. |
Does it only happen with renamed files? I can also confirm that downgrading to |
As far as I can tell, yes. |
v2.7.2 and earlier parsed the diff manually using pure python regex patterns. I don't want to go back to that (as a fall back approach), but if the response from libgit2 devs is too slow (or nonexistent) then I will. |
uses legacy approach (pure python) to parsing a diff str when pygit2 fails. added unit test to notify when bug is fixed prints an ERROR and a WARNING log message in users' CI runs when legacy approach was taken
uses legacy approach (pure python) to parsing a diff str when pygit2 fails. added unit test to notify when bug is fixed prints an ERROR and a WARNING log message in users' CI runs when legacy approach was taken
uses legacy approach (pure python) to parsing a diff str when pygit2 fails. added unit test to notify when bug is fixed prints an ERROR and a WARNING log message in users' CI runs when legacy approach was taken
v2.7.5 reintroduces the legacy approach (pure python regex) for parsing diff when pygit2 fails. The workflow's logs will show when pygit2 fails and legacy parsing is used as a fallback. I'm still tracking this bug... I have a unit test will fail when the bug is fixed. And there's the issue I raised upstream. |
I just updated the version of the linter to the latest (v2.7.4) and it's giving out python errors
https://github.com/edunad/rawrbox/pull/108/checks#step:9:641
The text was updated successfully, but these errors were encountered: