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

Re: Git at Better SCM Initiative comparison of VCS (long)

From
Jakub Narebski <jnareb@gmail.com>
Date
Sep 14, 2008, 21:29 UTC
Message-ID
<200809142329.03186.jnareb@gmail.com>
In-Reply-To
<20080914210648.GB26608@spearce.org>
On Sun, 14 Sep 2008, Shawn O. Pearce wrote:
Show 22 quoted lines
> Dmitry Potapov <dpotapov@gmail.com> wrote:
>> On Sun, Sep 14, 2008 at 07:48:05PM +0200, Jakub Narebski wrote:
>>> 
>>> [...] if it is possible
>>> using current hooks infrastructure to restrict changes coming from
>>> some account in such a way as to allow it only if all changes are
>>> restricted to specified directory. 
>> 
>> I believe the update hook should be able to do that. You have oldrev and
>> newrev, so you can run "git diff --name-only oldrev newrev" and see what
>> files are going to change. And then verify that the user has the write
>> access to this directories or files.
>> 
>> I have not tried it yet, and I don't think we have a ready example of
>> how to do that, but I believe that the example of the update hook that
>> restricts user access based on the target branch can be used as a
>> starting point.
> 
> contrib/hooks/update-paranoid can do both branch and file path
> level restrictions.  I used it at my prior day-job to prevent some
> accidental changes from folks who didn't usually need to modify
> certain parts of the repository.

Could you then update contrib/hooks/update-paranoid documentation? It talks only about branch level restrictions (created, delete, fast-forward, forced update for a given ref class).

Thanks in advance
-- 
Jakub Narebski
Poland
Previous: Shawn O. PearceNext: Jakub Narebski
Message 7 of 9 in “Git at Better SCM Initiative comparison of VCS (long)”
  1. Jakub NarebskiSep 13, 2008
  2. Dmitry PotapovSep 14, 2008
  3. Alexey MahotkinSep 14, 2008
  4. Jakub NarebskiSep 14, 2008
  5. Dmitry PotapovSep 14, 2008
  6. Shawn O. PearceSep 14, 2008
  7. Jakub NarebskiSep 14, 2008
  8. Jakub NarebskiSep 15, 2008
  9. Jakub NarebskiOct 1, 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.