git_stats icon indicating copy to clipboard operation
git_stats copied to clipboard

Previous git command did not work on Windows

Open colonelchlorine opened this issue 6 years ago • 2 comments

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?

colonelchlorine avatar Jan 05 '19 14:01 colonelchlorine

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

tomgi avatar Jan 05 '19 16:01 tomgi

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 :)

colonelchlorine avatar Jan 20 '19 15:01 colonelchlorine