# git branch based hook desigh

2 messages from 2013-03-18 to 2013-03-20. Participants: Joydeep Bakshi, Magnus Bäck.
Thread: https://gitlist.dev/t/33213

## Joydeep Bakshi, 2013-03-18 04:27

Subject: git branch based hook desigh
Message-ID: <148C5E2E-8FD6-4686-A009-57D1F403C808@infoservices.in>
URL: https://gitlist.dev/e/148C5E2E-8FD6-4686-A009-57D1F403C808%40infoservices.in

```
Hello list,

I have implemented git pre-received hook successfully. And it works on the repo level.
Could anyone suggest how to call branch level hook please ?
```

## Magnus Bäck, 2013-03-20 13:46

Subject: Re: git branch based hook desigh
Message-ID: <20130320134631.GA7325@google.com>
URL: https://gitlist.dev/e/20130320134631.GA7325%40google.com
In-Reply-To: <148C5E2E-8FD6-4686-A009-57D1F403C808@infoservices.in>

```
On Monday, March 18, 2013 at 00:27 EDT,
     Joydeep Bakshi <joydeep.bakshi@infoservices.in> wrote:

> I have implemented git pre-received hook successfully. And it works on
> the repo level.
> Could anyone suggest how to call branch level hook please ?--

If you need to have different hook behaviors depending on the ref that's
about to be updated, just put a conditional in the hook. You get the
name(s) of ref(s) to be updated on stdin.

-- 
Magnus Bäck
baeck@google.com

```
