Amir Ali Akbari
Amir Ali Akbari

Reputation: 6396

Bypassing gitolite restrictions for specific commits

In a gitolite setup, is there a way to allow some commits to bypass some restrictions?

More specifically, I want to deny some actions (like creating a branch) to prevent doing so by accident, these restrictions are done in gitolite.conf file and I know how to do so, but additionally I want users to be able to bypass some of these restrictions if they are really sure (e.g. by including --force in commit message).

Is this possible trough gitolite configuration itself or a plugin? If not, how can I modify gitolite hooks to enable such feature?

Upvotes: 2

Views: 286

Answers (1)

VonC
VonC

Reputation: 1323203

For any custom-designed restriction you might want to enforce, you could consider using, especially with gitoliteV3, the VREFS or "Virtual References.

Those are script which can allow or deny a git command based on a variety of criteria, including commit message (as I recently illustrated in "git gitolite (v3) pre-receive hook for all commit messages").

Upvotes: 1

Related Questions