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

Re: Git and tagging hook

From
JHJan Hudec <bulb@ucw.cz>
Date
Oct 14, 2008, 17:22 UTC
Message-ID
<20081014172227.GB6931@efreet.light.src>
In-Reply-To
<48ECF072.3000506@op5.se>
On Wed, Oct 08, 2008 at 19:40:02 +0200, Andreas Ericsson wrote:
Show 5 quoted lines
> Kristis Makris wrote:
>> On Tue, 2008-10-07 at 19:28 +0200, Jakub Narebski wrote:
>>> Kristis Makris wrote:
>>>> I want the integration when I apply the tag to a local repository, NOT
>>>> only when I push/pull.
Care to explain why that would ever be useful? It's local, which means that:
 - the user can take it back without a trace it ever happened (git tag -d or
   even git update-ref -d) and
 - noone except the user will see it anyway, so it's not like they should
   care either.

Besides, you don't need git tag to create a tag in git, so the hook wouldn't really be guaranteed anyway (I mean, just like the commit hook is not -- you can still commit by calling write-tree, commit-tree and update-ref and avoid the hook).

Show 20 quoted lines
>>> If you are talking about taging locally, you can simply make an alias
>>> or do something after tagging. Search archives for description when
>>> it is worth to add a hook, and when it is not.
>>
>> I am looking for a guarantee that is better than casually saying
>> "simply". I will be providing the integration work to users that may not
>> be as comfortable with making aliases. 
>>
>> I still don't see why a hook on local tagging is not available. Is it
>> possible to add support in Git for such a hook ? Both pre-tag and
>> post-tag.
>
> Because noone's ever needed one before. If aliases can't do what you
> want, write a patch to support it and hope Junio accepts it. It's really
> quite straight-forward. Make sure you read Documentation/SubmittingPatches
> before you send it.
>
> Note though that use of tags on the developer's side will still be up
> to the developer and not something you can force through other means
> than policy or convention.

Being possible was never a reason to add features to git and the less it was a reason to add hooks. And there does not seem to be a use-case that would clearly benefit from having such hooks, or at least none was shown on the list so far.

For integration with issue tracker, the local tag is neither final, nor useful to anybody except the user who did it until it hits the central repository. And working on the central repository directly does not seem like a good idea either.

-- 
						 Jan 'Bulb' Hudec <bulb@ucw.cz>
Previous: Andreas EricssonNext: Andreas Ericsson
Message 7 of 15 in “Git and tagging hook”
  1. Kristis MakrisOct 6, 2008
  2. Andreas EricssonOct 6, 2008
  3. Kristis MakrisOct 7, 2008
  4. Jakub NarebskiOct 7, 2008
  5. Kristis MakrisOct 8, 2008
  6. Andreas EricssonOct 8, 2008
  7. Jan HudecOct 14, 2008
  8. Andreas EricssonOct 6, 2008
  9. Kristis MakrisOct 7, 2008
  10. Andreas EricssonOct 8, 2008
  11. Kristis MakrisOct 14, 2008
  12. Andreas EricssonOct 14, 2008
  13. Daniel BarkalowOct 14, 2008
  14. Jan HudecOct 16, 2008
  15. Andreas EricssonOct 17, 2008

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.