Skip to content
This repository has been archived by the owner on Jun 9, 2019. It is now read-only.

Prevent accidental changes to .gitmodules #2

Open
thomie opened this issue Jul 21, 2015 · 4 comments
Open

Prevent accidental changes to .gitmodules #2

thomie opened this issue Jul 21, 2015 · 4 comments

Comments

@thomie
Copy link

thomie commented Jul 21, 2015

With haskell-infra/phab-ghc-builder#2 merged, we can now validate submodule updates on Phabricator, by editing .gitmodule temporarily. https://phabricator.haskell.org/D1033 is the first Diff to do so.

Maybe we should have a git hook that prevents any urls from entering the .gitmodules file.

@hvr
Copy link
Contributor

hvr commented Jul 21, 2015

I think it's easier to just add a rule to the Gitolite config to limit access to the .gitmodules files for non-wip branches... :-)

@thomie
Copy link
Author

thomie commented Jul 21, 2015

Sure. Do note we may want to add new submodules to .gitmodules later (e.g. shake).

@hvr
Copy link
Contributor

hvr commented Aug 17, 2015

@thomie sure, but adding a new submodule to .gitmodules requires additional administrative Git operations, so restricting access to .gitmodules to Git admins is the sensible thing to do anyway

@hvr
Copy link
Contributor

hvr commented Dec 12, 2015

Turns out I should have put this in place yesterday ;)

Especially since the script currently can be fooled to skip gitlink validation if the submodule URL is not recognised as local.

/cc @thoughtpolice @bgamari

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants