-
Notifications
You must be signed in to change notification settings - Fork 19
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
Go Rewrite #129
Go Rewrite #129
Conversation
Makeing good progress. Go is a charm sometimes a bit to easy, but good to keep it that way (miss generics...) |
Pull Request Test Coverage Report for Build 911
💛 - Coveralls |
552369b
to
caad441
Compare
@rycus86, @matthijskooijman Do you know what |
I suspect this checks whether the current user has effective "x" permissions on the file (because they are the owner and the owner has +x, they are in the owning grou and the group has +x or others have +x)? |
aa263ad
to
82815e8
Compare
I found a solution: 53db07b#diff-a5982e9eccefb8a42e5403f0a6324886 I also directly added a new feature to define a runner cmd (first good solution, needs more thoughts) for Other hook manager configure everything in a yaml/json file (lefthook). The thing about that is, that you need to read the whole config in every hook run, which is a bit inefficient. So I am not starting to go down this path... I stay as closesly to the existing implementation, and make useful adjustments if it proves to be no problems for the tests. I think first design principle is: Read as less config values and files as you can when executing the runner.
Not yet sure: may be we can also leave the file format as it was, to be faster... If you want more speed: -> Make a service which provide and cache these values for a repository (overkill) |
I'd suggest adding some timing output for debugging, I don't necessarily think reading config should take that long to be honest, so perhaps don't worry about it for now (especially if you intend to keep the existing tests for the rewrite). I'd keep config and operations the same (just replaced implementation) then once it's ready to be switched over it'll be easier to change config formats and such. |
06338da
to
c495637
Compare
@matthijskooijman , @rycus86 : Do you know something about that? |
c495637
to
4b4e0ac
Compare
@rycus86 If you wanna try the prompting some first steps: -> Readme ./build.sh && ./test.sh |
4b4e0ac
to
386b508
Compare
I fought with this a lot, even just targeting Linux, but it's a sh*tshow... 🙈 What do you need this for here specifically? |
Ah thanks for pointing me to: https://github.com/moby/term |
Nope, no experience with getting terminals on Go or cross-platform, sorry. |
b4e00ee
to
c088673
Compare
- No '--stdin' where no stdin attached. Under docker we have no stdin why it works. Under windows stdin is attached so it blocks. That was a replace mistake.
- Windows tests need a proper temp. dir. Therefore use everywhere a env variable.
- On windows we might need 'sh -c'. For now disable it. - Cleaned runner executable: ${hookPath} will be replaced.
- Better for args feed through - Small output fix in runner
- Build own git-lfs executable. A shell script will not work on all platforms. - golint corrections.
- Properly delete git-core/templates/hooks folder.
- Todo: This needs rework. See Readme.md
371db42
to
8e1c085
Compare
@rycus86 , @matthijskooijman : |
Nice one! I ought to check it out at some point, will try to find some time soon. |
I can finally close this. It was huge work, good fun, grulesome migration with the test (esp. windows...), but I think its in a good shape. There is stilll some stuff missing out for the various deploy scenarios. I added you as a collaborator (feel free =). You should probably not push into master right now, rather open PRs if you want, I am still cleaning up a bit. It would be cool if you could post a bold sign on the front page of the old implementation redirecting to the new one :-). Ok sad that the Github stars do not get transferred ;-), but anyway, your vision and features are the right implementation I think for a hook manager, thats why I like it. Its powerful, but still fully configurable. A review would have been nice, but jeah everybody has little time, so far I kept to my own principles -> clean and as proper as possible... maybe you could read through the Readme.md and questions, english corrections and suggestions may pop up, which I can still take up and implement, that would help :-) |
Ah of course: We need covarge, that another ticket I need to address... |
Awesome news @gabyx well done! Thanks a lot for taking on the evolution of this project! |
Progress
A draft PR to have you guys in the boat.
The progress of porting this application could be like this:
cli.sh
andinstall.sh
in shell)base-template.sh
GO executable.install.sh
(leave cli in sh) in GoThe version corresponding to the determined tag in the release clone is downloaded and installed.
Checksummed and signed with GPG.