From: Mark Plaksin <happy@usg.edu>
To: git@vger.kernel.org
Subject: Re: Syntax check via update hook?
Date: Wed, 20 May 2009 16:57:01 -0400 [thread overview]
Message-ID: <ws8wkrsdb6.fsf@usg.edu> (raw)
In-Reply-To: 20090520152224.GB22426@coredump.intra.peff.net
Jeff King <peff@peff.net> writes:
> On Wed, May 20, 2009 at 11:13:09AM -0400, Mark Plaksin wrote:
>
>> Well, it's oh so close! If we make changes that don't pass the syntax
>> check and try to push them the hook rejects the changes. If we then
>> make a change that will pass the syntax check, leave the others broken,
>> and push, 'git diff-tree' doesn't list the previously rejected files so
>> the hook accepts the push. Is there any way to get 'git diff-tree' to
>> list all of the files?
>
> Ah, yeah, that was my mistake. If you are looking at the whole tree,
> then you only need to look at what is being pushed, as it contains the
> changes for all of the commits being pushed. But if you are going to ask
> for a diff, you want to see not just the final commit, but the diff
> between what is in the ref now and what you are proposing to push.
>
> The old commit is passed as the second argument to the hook. So you
> should be able to just do:
>
> git diff-tree "$2" "$3"
That did the trick once we put the '-r' back :) Thanks very much!
prev parent reply other threads:[~2009-05-20 20:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-08 19:43 Syntax check via update hook? Mark Plaksin
2009-05-09 14:47 ` Jeff King
2009-05-12 19:16 ` Mark Plaksin
2009-05-14 6:55 ` Jeff King
2009-05-14 19:52 ` Mark Plaksin
2009-05-20 15:13 ` Mark Plaksin
2009-05-20 15:22 ` Jeff King
2009-05-20 20:57 ` Mark Plaksin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ws8wkrsdb6.fsf@usg.edu \
--to=happy@usg.edu \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.