From: "Shawn O. Pearce" <spearce@spearce.org>
To: Mahesh Vaidya <forvaidya@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: pre-receive - 1st push / rev-list didn't work
Date: Mon, 28 Jun 2010 11:03:24 -0700 [thread overview]
Message-ID: <20100628180324.GD2337@spearce.org> (raw)
In-Reply-To: <AANLkTikGtbfcHCUXm7aVljj_Opb3blKWC0dzfq_HiV8-@mail.gmail.com>
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.
prev parent reply other threads:[~2010-06-28 18:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 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=20100628180324.GD2337@spearce.org \
--to=spearce@spearce.org \
--cc=forvaidya@gmail.com \
--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.