git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* how-to get commit content with pre-receive hook ?
@ 2017-04-06 14:03 Eric Belhomme
  2017-04-06 18:38 ` Ævar Arnfjörð Bjarmason
  2017-04-06 20:13 ` Igor Djordjevic
  0 siblings, 2 replies; 4+ messages in thread
From: Eric Belhomme @ 2017-04-06 14:03 UTC (permalink / raw)
  To: git

Hello the list,

Until now I ever had a quite "basic" Git usage, but now I'm working on a 
project based on Git hooks feature.. and I'm a very beginner with Git 
hooks !

My need consist doing a syntax check on submitted files before a 'git 
push'. So the right hook is 'pre-receive' and I'm already able to 
identify the files I want to check using 'git show'.

But I don't know how to get the *content* of the file being submitted to 
run my syntax check rules against it !

I googled but most examples using pre-receive I found are doing sanity 
check on enveloppe but never on actual content of the file !

Could someone here put me on the rails ?

Regards,

-- 
Eric


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-04-06 20:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-06 14:03 how-to get commit content with pre-receive hook ? Eric Belhomme
2017-04-06 18:38 ` Ævar Arnfjörð Bjarmason
2017-04-06 18:48   ` Stefan Beller
2017-04-06 20:13 ` Igor Djordjevic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).