git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Git tag: pre-receive hook issue

From
Garbageyard <varuag.chhabra@gmail.com>
Date
Jul 17, 2015, 18:58 UTC
Message-ID
<1437159533304-7635764.post@n2.nabble.com>

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.

Next: Junio C Hamano
Message 1 of 13 in “Git tag: pre-receive hook issue”
  1. GarbageyardJul 17, 2015
  2. Junio C HamanoJul 17, 2015
  3. Jacob KellerJul 18, 2015
  4. Gaurav ChhabraJul 18, 2015
  5. Junio C HamanoJul 18, 2015
  6. Jacob KellerJul 18, 2015
  7. Gaurav ChhabraJul 19, 2015
  8. Jacob KellerJul 19, 2015
  9. Gaurav ChhabraJul 19, 2015
  10. Jacob KellerJul 19, 2015
  11. Gaurav ChhabraJul 20, 2015
  12. Keller, Jacob EJul 20, 2015
  13. Jakub NarębskiJul 22, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.