-
Notifications
You must be signed in to change notification settings - Fork 27
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
Gitlogg is broken for some repositories #7
Comments
Hi there @Inventitech, I missed this one completely, been away for a while. Let me look into this and see if I can solve it within the Through this project I've come to realise that Cheers for the heads-up! |
Hi there again, I have some good news! ✨ I got the It ran pretty fast too. 🚀 I could not reproduce the error you've reported with |
Hey @dreamyguy, Thanks for the reply. Interesting. I suspect there is some inconsistency in the intermediate representation extracted from git log. Which version of Git are you running?
Does parsing my gitlogg.tmp work for you? If it does, the error lies elsewhere. |
Hey @dreamyguy! I'm actually running your gitlogg tool as well. Looking to utilize it to provide some clean, useful information across multiple repositories. I'm seeing the same issue, but I've yet to debug the root cause. I've added a loop in gitlogg-parse.json.js to print every value in the item array:
At some point while trying to run gitlogg.sh, I will eventually see item[68] which is usually populated with the value for "stats" populated with no information, and then the following item[0] which contains the string "commits" will also contain the stats. Expected (from same output just prior to issue)
Actual:
Trying to determine if there's an issue with the parsing logic that removes/converts newlines/line-breaks. Edit: To clarify, the first time this issue happens does not cause the error, but what happens as a result is that every subsequent items group suddenly sees the same issue of the stats values being placed in item[0] instead of item[68]. Which results in one last newline at the bottom of gitlogg.tmp containing just the stats value. The result is a single line at the bottom of gitlogg.tmp that attempts to be parsed but only contains information in item[0], while item[1-68] are undefined, throwing the error. Edit 2: Autofilled the wrong username at the top. Meant to direct to @dreamyguy |
After breaking down the git log and parsing step by step, I discovered that there was actually a carriage return (^M) character in one of the Git commit messages being parsed, which was adding an extra newline and throwing all subsequent parsing off as a result. Modifying the parsing in gitlogg-generate-log.sh to include a carriage return deletion allows me to get past the issue.
|
Hi @Inventitech, thanks for posting the As @OrenRysn indirectly pointed out, Nearly all problems I've had with I'll look into this asap, and cheers for the feedback! |
@Inventitech and by the way, we have the same |
@OrenRysn only to comment on your first post, the index in the parser gets messed up when the output of I'll see what I can do, and thanks again for the heads-up. |
Hi guys, I did 3 commits that will hopefully help. The first 2 didn't really correct anything, but help show what's happening on the console (how many repos will be parsed and which repo is getting its All credit for the 3rd commit goes to @OrenRysn 🏆 , but I did choose to replace carriage return with space instead of deleting it. @Inventitech I'm really struggling to reproduce your problem, I haven't managed to get a broken output on Could you pull my latest changes and try again? |
Another update, with a few more commits since this issue was opened. @Inventitech since I've been at it, I have successfully generated Try running gitlogg exactly as described here, with the latest changes, and let me know how it goes. |
Error still persists :(
|
That's really too bad @Inventitech. Is your gitlogg.tmp still breaking at the same line? I have to find a way to validate I have prepared a gist with travistorrent-tools's gitlogg.json output, so you can play with it until a solution is found. 🎯 Just for curiosity, what system are you on? I'm on OSX 10.11.6, El Capitan. BTW I've pushed a new release today, which makes the initial setup simpler and less error-prone - hopefully. The README has been updated accordingly. I'd try starting from scratch with a new |
I'm a Linux dude. If I remember correctly, what breaks it is that occasionally, you just get a stats output for a whole range of commits, not a single commit. I'll have time to look into this in more depth in about two to three weeks. |
@Inventitech while testing your pull-request with humongous I'll be creating issues on them when time allows. |
I can now say - with a hand in my heart - that this issue is resolved with the v0.1.9 release. 🎆 I've tested all these repos, in a single run of Note that the commit count is not updated, since I cloned these repos many weeks ago.
Stats:
There are less lines on the output file than the number of total commits, but that's because I exclude merges with the Do try v0.1.9 out! 🏆 |
Still no luck, sir :(
|
@Inventitech I ran into this Please do test this on a fresh clone of Gitlogg, so you're sure to have the very latest version, v0.1.9, which no longer has the parallelization changes. I think you're still running an older version, since you created a pull-request two hours ago with code from v0.1.8. I released v0.1.9 quite late yesterday, so it's very new. |
No, as you can see above |
Are these the repos you tested with? https://github.com/gousiosg/ghtorrent-update Note that parallel processing is completely removed on v0.1.9, so you can omit the CLI option. |
Yes (regarding repositories). |
@Inventitech I just tested these repos and got no error. To be 100% sure we're taking the exact same steps, I've put this one-liner together. It's the same line I've used to test:
Run the line and let me know how it goes. If you don't get it to work, let me know the specs of your OS and I'll open another issue that's specific to Linux, for I can't reproduce it on OSX. |
gitlogg-parse-json.js
is broken.Minimally demonstrative example: Analyse repository TestRoots/travistorrent-tools.
Thanks for looking into this :-), I liked the way you prepare the
git log
output ingitlogg-generate-log.sh
. Should this problem be related togit log
behaving strangely (printing/not prinitng empty lines), I might have a clean fix withawk
.The text was updated successfully, but these errors were encountered: