[ofiwg] linux coding style question, or what is the libfabric interpretation of "resembles"

Dave Goodell (dgoodell) dgoodell at cisco.com
Tue Mar 10 14:37:38 PDT 2015


On Mar 10, 2015, at 4:08 PM, Patrick MacArthur <pmacarth at iol.unh.edu> wrote:

> +1 the use of pre-commit hook and a similar automated check on all pull
> requests
> 
> On 03/10/2015 04:51 PM, Dave Goodell (dgoodell) wrote:
>> If you really mean "pre-commit hooks" in the Git sense (local hook
>> scripts that run during "git commit" and don't let it succeed if the
>> script fails), then I don't think there's a way to have one of those
>> installed automatically for someone just by cloning the repository.
>> We could stick it in a "contrib" directory and ask developers to
>> copy/link the script into their ".git/" directories whenever they
>> clone a new repository, but that's far from a robust solution.  You
>> could use a "template" (see http://git-scm.com/docs/git-init) to make
>> it a little easier, but there will still be a manual step.
> 
> FWIW in UNH EXS, I added code to the autogen.sh script which copies the
> pre-commit hook script into place (which itself lives in the UNH EXS git
> repository).  This isn't foolproof, but means that most users will get
> the hook automatically when they first attempt to build a fresh clone.

What do you do if the user already has a pre-commit hook in place?  Do you fail, complain loudly, install the script in such a way that it chains, or something else?  Clobbering an existing user script wouldn't be very friendly.

-Dave




More information about the ofiwg mailing list