On Sat, Jun 28, 2014 at 1:26 AM, Rohit Yadav <rohityada...@gmail.com> wrote:
> On Sat, Jun 28, 2014 at 2:43 AM, David Nalley <da...@gnsa.us> wrote:
>
>> we could always add it to .gitignore
>> That wouldn't stop changes from being made, but it would stop changes
>> from propagating to the repo itself.
>>
>
> But David, one can git add -f or something. Can we put a git hook (post
> commit/push) on the ASF repo if possible which could send us an alert email
> when certain files are changed?
>

True they can do add -f; though hopefully no committer would do such
things; and submitted patches would be caught.
Also, on further review .gitignore is a poor mechanism when used in
conjunction with git commit -a

As for a git hook. No, not a real git hook, but look at gitpubsub for options.
http://www.apache.org/dev/gitpubsub.html


> Daan, we could have a cron job that checks this for us and alert us on
> email if certain files are changed? Here something like Herald could work
> which triggers alerts when code changes pass a complex condition (changing
> of file, or code etc.) [1]
>
> [1] http://phabricator.org/applications/herald/
>
> Regards.
>
>
>>
>> On Fri, Jun 27, 2014 at 5:05 PM, Daan Hoogland <daan.hoogl...@gmail.com>
>> wrote:
>> > Rohit, sorry for the late reaction. this works for defending yourself
>> > and maybe we should all do it, it doesn't defend the repo from
>> > checkins. I would prefer that.
>> >
>> > On Tue, Jun 24, 2014 at 10:07 PM, Rohit Yadav <rohityada...@gmail.com>
>> wrote:
>> >> 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
>> >>>
>> >
>> >
>> >
>> > --
>> > Daan
>>

Reply via email to