Coder Social home page Coder Social logo

git-blacklist's Introduction

This is a simple hook for a centralized Git repository to which multiple users
have the ability to push.  If one user pushes a commit that they realize is a
mistake, adding the sha1 of that commit to the blacklist helps prevent other
users from unwittingly re-pushing the bad commit.

Prerequisites:

 * Perl - http://www.perl.org
 * DBM::Deep - http://search.cpan.org/dist/DBM-Deep/

Installation:

1) Copy the "update.blacklist" script to the hooks/ directory of the desired Git
repository, making sure that it is executable.  You should then either change
its name to "update", or have it execute from an existing update hook.  Remember
that the exit code of the hook is important, and a non-zero exit status should
be passed along from any wrapper.

2) Create a directory under hooks named data (hooks/data/).  You'll want to
ensure that this directory is writable by all users, and should probably have
0775 permissions.

3) Create a file in hooks/data/, again writable by all users, which is named
"blacklist".  You can use "blacklist.sample" as a template, which contains
some helpful comments for users.

4) Optionally create a "blacklist-error" file under hooks/data/ which instructs
the users how to resolve the error they received, or who to contact.  You may
want to use the included "blacklist-error.sample" file as an example message.

Usage:

When the hook is activated, it will read the "blacklist" file, and create a
blacklist.db file which contains any configuration found in that file.  If the
file exists already, the mtime of the blacklist file will be inspected to
determine if it must repopulate the database.

git-blacklist's People

Contributors

cxreg avatar

Watchers

James Cloos avatar Laurent T. avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.