git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Garbageyard <varuag.chhabra@gmail.com>
To: git@vger.kernel.org
Subject: Git tag: pre-receive hook issue
Date: Fri, 17 Jul 2015 11:58:53 -0700 (MST)	[thread overview]
Message-ID: <1437159533304-7635764.post@n2.nabble.com> (raw)

We have a pre-receive hook that checks for JIRA ID whenever someone pushes
code to Git server. I'm trying to avoid this check when someone is applying
a tag. Here's the link for the script: http://pastebin.com/VnMQp5ar

This is the link for output: http://pastebin.com/tBGmYaZF

Problem is that if i run the following command, the output that i get on
command line is 0

git describe --exact-match ac28ca721e67adc04078786164939989a5112d98 2>&1 |
grep -o fatal | wc -w

So i'm wondering why it's not entering the IF block (as confirmed in the
output link)

I agree this is a bad implementation (and i will change it soon) for
checking tags and can be easily done by just checking whether $refname
starts with refs/tags/ but i'll really appreciate if someone could tell me
the mistake i'm committing. I've spent few hours banging my head on this.



--
View this message in context: http://git.661346.n2.nabble.com/Git-tag-pre-receive-hook-issue-tp7635764.html
Sent from the git mailing list archive at Nabble.com.

             reply	other threads:[~2015-07-17 19:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-17 18:58 Garbageyard [this message]
2015-07-17 19:30 ` Git tag: pre-receive hook issue Junio C Hamano
2015-07-18  4:00 ` Jacob Keller
2015-07-18 20:08   ` Gaurav Chhabra
2015-07-18 21:19     ` Junio C Hamano
2015-07-18 22:22     ` Jacob Keller
2015-07-19  7:55       ` Gaurav Chhabra
2015-07-19  8:38         ` Jacob Keller
2015-07-19 10:13           ` Gaurav Chhabra
2015-07-19 23:35             ` Jacob Keller
2015-07-20  7:43               ` Gaurav Chhabra
2015-07-20 16:02                 ` Keller, Jacob E
2015-07-22 19:46           ` Jakub Narębski

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1437159533304-7635764.post@n2.nabble.com \
    --to=varuag.chhabra@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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).