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

Unreliable git-log parsing #43

Open
rimutaka opened this issue Nov 2, 2021 · 0 comments
Open

Unreliable git-log parsing #43

rimutaka opened this issue Nov 2, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@rimutaka
Copy link
Member

rimutaka commented Nov 2, 2021

The way git-log is parsed at the moment is unreliable. If the log is corrupt the logic will fail or produce an incorrect result.

E.g., a file named commit log.md from https://github.com/G-yhlee/coupang-reward-systemwas read as a new commit line placing log.md into the SHA1.

commit 6a01533392e808faec2d0a3076af9c26f31919ff
Author: G-yhlee <[email protected]>
Date:   Fri Sep 3 20:08:20 2021 +0900

    i

.gitignore
book/server/s2c.md
commit log.md
``
The handling was somewhat improved in https://github.com/stackmuncher/stm_app/commit/2cbaf72f29db673b28f879033e14f46f19fc2293, but it is still unreliable.

## Suggested improvements
1. Check if SHA1 is fully compliant with its format
2. allow skipping log lines until a reliable commit section is encountered
3. switch to using --raw format to get the action performed on the file (A,M,D) and get a more structured output
@rimutaka rimutaka added the bug Something isn't working label Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant