pre-receive - 1st push / rev-list didn't work

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

pre-receive - 1st push / rev-list didn't work

From: Mahesh Vaidya <hidden>
Date: 2016-06-15 22:49:01

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

Re: pre-receive - 1st push / rev-list didn't work

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:49:01

Mahesh Vaidya [off-list ref] 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help