Hi Daan and others,

Let me share a way to guard files that interest us by alerting us using the
following shell script git hook:

Put the following your .git/hooks/post-merge (make sure to chmod +x the
following shell script):

# START OF SCRIPT

#/usr/bin/env bash
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD
HEAD)"

check_run() {
    echo "$changed_files" | grep --quiet "$1" && eval "$2"
}

check_run .*.sql "say 'Found new delta. Please run it'" # on OSX this will
literary speak out these words, fix as needed

# END OF SCRIPT

Acknowledgement: I did not invent this but reused this from Sindre Sorhus
of sindresorhus.com

Change filenames and regexes as needed. This will run everytime one does a
git pull (not fetch, it runs post merging a remote/local branch to
master/current branch).

Hope this helps.


On Tue, Jun 24, 2014 at 2:48 PM, Daan Hoogland <daan.hoogl...@gmail.com>
wrote:

> including the source release? I don't like:( I do agree that some kind
> of guard would help, though
>
> On Tue, Jun 24, 2014 at 10:57 AM, Prasanna Santhanam <t...@apache.org>
> wrote:
> > On Tue, Jun 24, 2014 at 10:51:31AM +0200, Daan Hoogland wrote:
> >> It should be included in any release
> >>
> > so packaging can bring it back i thought. just a thought.
> > --
> > Prasanna.,
> >
> > ------------------------
> > Powered by BigRock.com
> >
>
>
>
> --
> Daan
>

Reply via email to