tomgi / git_stats

GitStats is a git repository statistics generator.
MIT License
1.08k stars 154 forks source link

Previous git command did not work on Windows #94

Open colonelchlorine opened 5 years ago

colonelchlorine commented 5 years ago

Also author's summary/details were not created because of a URL bug

Fixes issue #90.

@tomgi are you available to review this? Can you give another Ruby dev access to this repo, to give it some legs?

tomgi commented 5 years ago

Hi @colonelchlorine, thanks for the patch!

Unfortunately I'm afraid that it breaks the command format on linux - with your version I'm getting

sh: 1: %at^: not found
sh: 1: %aE: not found
usage: git rev-list [OPTION] <commit-id>... [ -- paths... ]
(...)

If you can make it work on both platforms I'm happy to merge it.

See the integration tests that are executed on linux - over 50 of them are broken on this PR https://travis-ci.org/tomgi/git_stats/builds/475706041

colonelchlorine commented 5 years ago

Haven't coded very much in Ruby, so it took a while to get this set up and configured on Windows w/ its bash subsystem (ubuntu).

Worked on this a few weekends ago and found that with Powershell or even msys32 bash, I don't think it's possible to write one bash style command with pipes that work on both sides.

Is there a common method in Ruby to determine the OS / terminal that the ruby script is being executed in?

Thanks for the feedback @tomgi. Nice unit tests :)