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

RE: global hooks - once again

From
Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Date
Jul 6, 2010, 14:55 UTC
Message-ID
<A612847CFE53224C91B23E3A5B48BAC744940F7000@xmail3.se.axis.com>
In-Reply-To
<AANLkTilZcuYxb6ASgJq82JVdgcRcuak5PvYXZF6fcojm@mail.gmail.com>
Show 10 quoted lines
> -----Original Message-----
> From: git-owner@vger.kernel.org [mailto:git-owner@vger.kernel.org] On
> Behalf Of Eugene Sajine
> Sent: den 6 juli 2010 14:23
> To: Alex Riesen
> Cc: git@vger.kernel.org
> Subject: Re: global hooks - once again
> 
> > How do your users disable execution of global hooks in this scheme?
> > (to protect themselves from an evil system administrator)

Yeah, I missed that case. What I have is another configuration variable (e.g., core.hooksActiveLevels) which is set to a string of different configuration levels (defaulting to 'system global local'). Only the hook directories specified on an active level are scanned for hooks. So by setting it to just 'local' any system and global hook directories are ignored.

This is not optimal, but was the best I could come up with. I really do not want to force the users to explicitly specify the hook directories for each repository, but rather be able to set it on a global level, and then use exceptions for the few cases where the global hooks should not be active.

> In a corporate environment it is not the case, i believe. If sysadmin
> made a mistake a with hooks, he will have to fix it, but there is no
> point in overriding on user level as hooks in this case will be
> something about company policy, aren't they?

Well, actually it is needed there too. Even though the vast majority of repositories the user clones are company repositories that should use the company's rules, he may clone some occasional repositories from the outside (e.g., Linux or git) in which case he probably wants to disable the global company hooks.

> Thanks,
> Eugene
//Peter
Previous: Eugene SajineNext: demerphq
Message 9 of 14 in “global hooks - once again”
  1. Eugene SajineJul 2, 2010
  2. Jonathan NiederJul 2, 2010
  3. Eugene SajineJul 2, 2010
  4. Junio C HamanoJul 2, 2010
  5. Eugene SajineJul 2, 2010
  6. Peter KjellerstedtJul 5, 2010
  7. Alex RiesenJul 6, 2010
  8. Eugene SajineJul 6, 2010
  9. Peter KjellerstedtJul 6, 2010
  10. demerphqJul 6, 2010
  11. Eugene SajineJul 6, 2010
  12. Eugene SajineJul 6, 2010
  13. demerphqJul 6, 2010
  14. Jonathan NiederJul 2, 2010

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.