Feature idea: Git hook for pre-checkout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Good morning,

I had an idea for a feature in Git. I am not sure if this is the
correct channel, but I could not find anything else. If not, could you
please let me know the best way to submit this?

Below, I will explain the idea and then the problem that this would solve.

<The idea>
I have a project that is using Git hooks. Besides pre-commit and
pre-push, I would like to use pre-checkout (rather than the already
available post-checkout). However, it seems like an active choice not
to have pre-checkout given the existing hooks, so I am curious as to
the reason behind this.

<The problem>
I want to do branch name validation when someone does git checkout -b.
If the branch name does not meet the requirements, the user should not
be allowed to checkout to it. As such, the post-checkout hook does not
fully meet my needs. It helps with doing the branch name validation,
but if it fails, the user is still on the feature branch. As such, if
they are ignorant about the error message, this does not stop them. I
am currently combining post-checkout and pre-push but would prefer
pre-checkout because this would prevent the user from doing work on
this feature branch and having to move their work.


I am looking forward to your thoughts. Thank you for your consideration.


Met vriendelijke groet / Kind regards,

Mike Weltevrede




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux