UCSD-PL / proverbot9001

GNU General Public License v3.0
39 stars 17 forks source link

how are you making sure each coq-proj is pinned to a specific git commit and doesn't break your setup? #80

Closed brando90 closed 1 year ago

brando90 commented 1 year ago

I noticed that the .modules file and git submodule add command don't have easy ways to pinn to specific commits afaik. So how does proverbot guarantee this then?

https://stackoverflow.com/questions/75417355/how-does-one-git-submodule-add-a-specific-commit-and-have-it-be-recorded-in-the

brando90 commented 1 year ago

one horrible solution is to forke every coq repo ever added and git submodule that. Then as long as your fork is not updated your safe. Def will be robust since you never change your repo (assuming that of course).

HazardousPeach commented 1 year ago

As you can see from the answer to the stack overflow question you asked, git handles pinning to commits internally, it's not reflected in the .gitmodules file. To specify which submodule commit you want, you git submodule add the submodule, then cd into that submodule and check out the desired commit. Then, in the toplevel repo you can commit the change of submodule commits. So git already handles this for us, we don't need another solution.