git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Can I enforce required approval on some files
@ 2010-07-20 20:22 Dominik Gront
  2010-07-20 20:45 ` Bruce Stephens
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Dominik Gront @ 2010-07-20 20:22 UTC (permalink / raw)
  To: git

Dear Group,

I have been a happy SVN user for quite a long time, but now I miss
some functionality in Subversion. I wonder if it could be done in git.
If so, I convert to git right away :-)

There are some files in our repository that all their modification
need to be approved by a project leader.  In general the desired
behavior would be (examples given in svn commands) :
- user runs "svn ci"
- some files have status "pending" or "waiting for approval"
- anyone can do "svn up", modifications to the pending files are not
retrieved, project leader can get the modified versions
- project leader accepts the changes
- anyone running "svn ci" sees all the modifications

Best,
Tim

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Can I enforce required approval on some files
  2010-07-20 20:22 Can I enforce required approval on some files Dominik Gront
@ 2010-07-20 20:45 ` Bruce Stephens
  2010-07-20 20:45 ` Sylvain Rabot
  2010-07-20 22:03 ` Jakub Narebski
  2 siblings, 0 replies; 6+ messages in thread
From: Bruce Stephens @ 2010-07-20 20:45 UTC (permalink / raw)
  To: Dominik Gront; +Cc: git

Dominik Gront <dgront@gmail.com> writes:

> I have been a happy SVN user for quite a long time, but now I miss
> some functionality in Subversion. I wonder if it could be done in git.
> If so, I convert to git right away :-)
>
> There are some files in our repository that all their modification
> need to be approved by a project leader.

Either have the repository owned by someone who'll do whatever checking
you want (which seems to be common at least amongst the public projects)
or use hooks in a shared repository.  Specifically the update hook.

The hook can do whatever checking you deem appropriate.  At work we have
it check the commit message for Signed-off-by names (in our context it
really means Reviewed-by; we use sob because that's more convenient to
add).  The hook could look at which files are changed or whatever else
you wanted.  (Notice it gets called to update a ref, and that may
involve more than one commit, so be sure to check all the relevant
commits.)

[...]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Can I enforce required approval on some files
  2010-07-20 20:22 Can I enforce required approval on some files Dominik Gront
  2010-07-20 20:45 ` Bruce Stephens
@ 2010-07-20 20:45 ` Sylvain Rabot
  2010-07-20 22:03 ` Jakub Narebski
  2 siblings, 0 replies; 6+ messages in thread
From: Sylvain Rabot @ 2010-07-20 20:45 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 1584 bytes --]

On Tue, 2010-07-20 at 13:22 -0700, Dominik Gront wrote:
> Dear Group,
> 
> I have been a happy SVN user for quite a long time, but now I miss
> some functionality in Subversion. I wonder if it could be done in git.
> If so, I convert to git right away :-)
> 
> There are some files in our repository that all their modification
> need to be approved by a project leader.  In general the desired
> behavior would be (examples given in svn commands) :
> - user runs "svn ci"
> - some files have status "pending" or "waiting for approval"
> - anyone can do "svn up", modifications to the pending files are not
> retrieved, project leader can get the modified versions
> - project leader accepts the changes
> - anyone running "svn ci" sees all the modifications
> 
> Best,
> Tim

Hi,

Git itself does not allow what you want but the workflow used to work
with git does. 

Each developer work and on a "copy" of the "blessed" repository (the one
checked out in svn, cloned in git) so it does not matter if
modifications done to a file need approval or not. Once the developer is
happy with his work he has to send his commit(s) to the person(s) in
charge of maintaining the project and this/those people will review the
changes and push (commit in svn language) them to the "blessed"
repository if they are ok with the changes made.

With git, if not used like svn, all modifications need approval.

You can read more about git's distributed workflow here :
http://progit.org/book/ch5-1.html

Regards.

-- 
Sylvain Rabot <sylvain@abstraction.fr>

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Can I enforce required approval on some files
  2010-07-20 20:22 Can I enforce required approval on some files Dominik Gront
  2010-07-20 20:45 ` Bruce Stephens
  2010-07-20 20:45 ` Sylvain Rabot
@ 2010-07-20 22:03 ` Jakub Narebski
  2010-07-21  0:42   ` Ævar Arnfjörð Bjarmason
  2 siblings, 1 reply; 6+ messages in thread
From: Jakub Narebski @ 2010-07-20 22:03 UTC (permalink / raw)
  To: Dominik Gront; +Cc: git

Dominik Gront <dgront@gmail.com> writes:

> I have been a happy SVN user for quite a long time, but now I miss
> some functionality in Subversion. I wonder if it could be done in git.
> If so, I convert to git right away :-)
> 
> There are some files in our repository that all their modification
> need to be approved by a project leader.  In general the desired
> behavior would be (examples given in svn commands) :
> - user runs "svn ci"
> - some files have status "pending" or "waiting for approval"
> - anyone can do "svn up", modifications to the pending files are not
>   retrieved, project leader can get the modified versions
> - project leader accepts the changes
> - anyone running "svn ci" sees all the modifications

Besides solution mentioned by others, namely integration repository
with moderator, you can also use patch/commit code review tool such as
Gerrit (http://code.google.com/p/gerrit/), equivalent of Rietveld for
Subversion, or Mondrian for Perforce.

-- 
Jakub Narebski
Poland
ShadeHawk on #git

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Can I enforce required approval on some files
  2010-07-20 22:03 ` Jakub Narebski
@ 2010-07-21  0:42   ` Ævar Arnfjörð Bjarmason
  2010-07-21  7:51     ` Jakub Narebski
  0 siblings, 1 reply; 6+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-07-21  0:42 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: Dominik Gront, git

On Tue, Jul 20, 2010 at 22:03, Jakub Narebski <jnareb@gmail.com> wrote:

> Besides solution mentioned by others, namely integration repository
> with moderator, you can also use patch/commit code review tool such as
> Gerrit (http://code.google.com/p/gerrit/), equivalent of Rietveld for
> Subversion, or Mondrian for Perforce.

There's also the low-tech solution of just telling people to submit
again until their patches don't suck, it works for git.git, and is
attainable when you're not doing a centralized tool.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Can I enforce required approval on some files
  2010-07-21  0:42   ` Ævar Arnfjörð Bjarmason
@ 2010-07-21  7:51     ` Jakub Narebski
  0 siblings, 0 replies; 6+ messages in thread
From: Jakub Narebski @ 2010-07-21  7:51 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: Dominik Gront, git

On Wed, 21 Jul 2010, Ævar Arnfjörð Bjarmason wrote:
> On Tue, Jul 20, 2010 at 22:03, Jakub Narebski <jnareb@gmail.com> wrote:
> 
> > Besides solution mentioned by others, namely integration repository
> > with moderator, you can also use patch/commit code review tool such as
> > Gerrit (http://code.google.com/p/gerrit/), equivalent of Rietveld for
> > Subversion, or Mondrian for Perforce.
> 
> There's also the low-tech solution of just telling people to submit
> again until their patches don't suck, it works for git.git, and is
> attainable when you're not doing a centralized tool.

That's what I meant by "besides [...] integration repository with
moderator", moderator who reviews patches or pull requests, and accepts
into integration repository or rejects them.

-- 
Jakub Narebski
Poland

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-07-21  7:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-20 20:22 Can I enforce required approval on some files Dominik Gront
2010-07-20 20:45 ` Bruce Stephens
2010-07-20 20:45 ` Sylvain Rabot
2010-07-20 22:03 ` Jakub Narebski
2010-07-21  0:42   ` Ævar Arnfjörð Bjarmason
2010-07-21  7:51     ` Jakub Narebski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).