Skip to content
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

GitParse Error: failed to parse line "--- /dev/null\n" after state "ModeLine" #2109

Closed
rgmz opened this issue Nov 12, 2023 · 0 comments · Fixed by #2206
Closed

GitParse Error: failed to parse line "--- /dev/null\n" after state "ModeLine" #2109

rgmz opened this issue Nov 12, 2023 · 0 comments · Fixed by #2206
Labels

Comments

@rgmz
Copy link
Contributor

rgmz commented Nov 12, 2023

Please review the Community Note before submitting

Description

I encountered the following error in the wild:

2023-11-12T10:29:01-05:00       error   trufflehog      Recovering at the latest commit or diff...
        {"job_id": 1, "source_manager_worker_id": "navoz", "source_type": "SOURCE_TYPE_GITHUB", "source_name": "trufflehog - github", "error": "failed to parse line \"--- /dev/null\n\" after state \"ModeLine\" (commit=fd6e99e7a80199b76a694603be57c5ade1de18e7)"}

I don't know the specific repository this belongs to. I will investigate and see what the issue might be.

Edit:

--- /dev/null after ModeLine suggests that it went directly ModeLine->FromLine without an IndexLine. This wasn't accounted for in #1486, and hasn't been encountered before as far as I can tell.

// --- a/internal/addrs/move_endpoint_module.go
func isFromFileLine(isStaged bool, latestState ParseState, line []byte) bool {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

1 participant