* pre-receive - 1st push / rev-list didn't work
@ 2010-06-28 17:55 Mahesh Vaidya
2010-06-28 18:03 ` Shawn O. Pearce
0 siblings, 1 reply; 2+ messages in thread
From: Mahesh Vaidya @ 2010-06-28 17:55 UTC (permalink / raw)
To: git
I am writing pre-receive hooks for commit validation. I use command
"git rev-list <from> <to>" to determine what am I pushing. I can
possibly pust more than one commit at a time.
If I am doing 1st ever push ; then <from> becomes "0" (40 times). How
do I determine what all commits I am pushing i this situations ?
Thx. Mahesh
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: pre-receive - 1st push / rev-list didn't work
2010-06-28 17:55 pre-receive - 1st push / rev-list didn't work Mahesh Vaidya
@ 2010-06-28 18:03 ` Shawn O. Pearce
0 siblings, 0 replies; 2+ messages in thread
From: Shawn O. Pearce @ 2010-06-28 18:03 UTC (permalink / raw)
To: Mahesh Vaidya; +Cc: git
Mahesh Vaidya <forvaidya@gmail.com> wrote:
> I am writing pre-receive hooks for commit validation. I use command
> "git rev-list <from> <to>" to determine what am I pushing. I can
> possibly pust more than one commit at a time.
>
> If I am doing 1st ever push ; then <from> becomes "0" (40 times). How
> do I determine what all commits I am pushing i this situations ?
Your hook has to detect the 0x40 case and just omit it from the
command line when you run git rev-list.
--
Shawn.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-06-28 18:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-28 17:55 pre-receive - 1st push / rev-list didn't work Mahesh Vaidya
2010-06-28 18:03 ` Shawn O. Pearce
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).