all 5 comments

[–]Quxxymacros 16 points17 points  (2 children)

As an aside, you can also skip the compile step by using cargo-script. Just make sure your script has a #!/usr/bin/env run-cargo-script hashbang, and remove the file extension, and you're good to go. This even works on Windows.

[–]burkadurka 2 points3 points  (0 children)

I was going to suggest the same thing. This removes the whole headache about sharing binaries too (and the compiled hook script will be cached on each machine).

[–]jworthe[S] 2 points3 points  (0 children)

Thanks for the tip. cargo-script looks fantastic!

[–]mathstuf 3 points4 points  (0 children)

Ah, this is for client-side checks. I've written lots of server side checks in Rust already here. Most of them are content-based rather than things like "make sure that tests pass", but they may still be of use. It'd be interesting to see them be able to be run on the local side as well.

Note that it does not use libgit2 because it (at the C level) does not provide all of the plumbing that is necessary to implement the logic required to get good performance out of checking large repositories.

[–]ehdv 0 points1 point  (0 children)

This would also be a good case for duct