Re: Git tag: pre-receive hook issue

2015-07-22 Thread Jakub Narębski
On 2015-07-19, Jacob Keller wrote: > git describe will tell you if the commit you're passing it is > associated with an annotated tag. I do not understand who this > information can help you implement any policy, so understanding what > the policy you want is would be the most helpful. One policy

Re: Git tag: pre-receive hook issue

2015-07-20 Thread Keller, Jacob E
On Mon, 2015-07-20 at 13:13 +0530, Gaurav Chhabra wrote: > Hi Jake, > > Thanks about the refs/tags check. I’m aware about this. Junio also > explained it in one of his replies. I was actually confused why my > current code was working in past for few of the annotated tags. > Anyways, now that I ha

Re: Git tag: pre-receive hook issue

2015-07-20 Thread Gaurav Chhabra
n annotated tag. I do not understand who this >>> information can help you implement any policy, so understanding what >>> the policy you want is would be the most helpful. >>> >>> I can't really help more or understand exactly what you were doing >

Re: Git tag: pre-receive hook issue

2015-07-19 Thread Jacob Keller
rstanding what policy you were/are trying to implement. >> >> The thing your code is doing today is something like: >> >> for each reference update, locate every commit >> >> for each commit in this reference update, check to see if it already >> has an ass

Re: Git tag: pre-receive hook issue

2015-07-19 Thread Gaurav Chhabra
ere. > > This doesn't make sense to me at all. I think what you *meant* was this: > > for each reference update, if the reference being updated is a tag, skip it > > otherwise, for each commit in the reference update do some checks on it. > > That is *completely* different from the code you've written today. > > Regards, > Jake > -- > To unsubscribe from this list: send the line "unsubscribe git" in > the body of a message to [hidden email] > More majordomo info at http://vger.kernel.org/majordomo-info.html > > > > If you reply to this email, your message will be added to the discussion > below: > http://git.661346.n2.nabble.com/Git-tag-pre-receive-hook-issue-tp7635764p7635875.html > To unsubscribe from Git tag: pre-receive hook issue, click here. > NAML -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Git tag: pre-receive hook issue

2015-07-19 Thread Jacob Keller
On Sun, Jul 19, 2015 at 12:55 AM, Gaurav Chhabra wrote: > @Junio: So from your detailed explanation (and Jake's comment), i > understand that since my ref wasn't updated on remote so querying the > same using "git describe" resulted in failure, and hence, code was not > entering the IF block. Corr

Re: Git tag: pre-receive hook issue

2015-07-19 Thread Gaurav Chhabra
-tag ac28ca721e67a > $git describe --exact-match ac28ca721e67a > $git push origin some-new-tag > > git describe --exact-match ac28ca721e67a > > > See the difference here? Maybe this isn't what you are trying to do at > all? What exactly behavior do you want to

Re: Git tag: pre-receive hook issue

2015-07-18 Thread Jacob Keller
On Sat, Jul 18, 2015 at 1:08 PM, Gaurav Chhabra wrote: > Thanks for the comments Junio/Jacob! Actually, the script was written > by someone before i came and the tag check was also done by my > colleague recently. I was also trying to implement the tag check > (using refs/tags which i did saw in f

Re: Git tag: pre-receive hook issue

2015-07-18 Thread Junio C Hamano
Gaurav Chhabra writes: > @Junio: From the example you gave, i could conclude the following: > > 1) : gitster garbage/master; git commit --allow-empty -m third > [master d1f1360] third > : gitster garbage/master; git describe --exact-match HEAD ;# third > fatal: no tag exactly matches 'd1f13

Re: Git tag: pre-receive hook issue

2015-07-18 Thread Gaurav Chhabra
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. >> >> >> > > Ok

Re: Git tag: pre-receive hook issue

2015-07-17 Thread Jacob Keller
ags/* as regular pre-receive hook examples do. Regards, Jake > -- > 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. > -- > To unsubscribe from this list: send

Re: Git tag: pre-receive hook issue

2015-07-17 Thread Junio C Hamano
Garbageyard writes: > 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

Git tag: pre-receive hook issue

2015-07-17 Thread Garbageyard
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. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More