threads / discuss / 4087

Locking a branch

Subject: Locking a branch

## tl;dr

2 messages between May 7, 2006 and May 8, 2006.

replies: 1people: 2as markdown or json

Pavel Roskin· May 7, 2006, 02:50 UTC · lore
Hello!

I see there is an active discussion about branch attributes. It would be nice to have an attribute to prevent git from changing the branch head in any way. The reason is that it interferes with StGIT on StGIT managed branches. If StGIT is fine with the change, it would remove or override the lock temporarily. StGIT could also unlock the branch permanently if there are no applied patches.

Another use of the branch lock would be to prevent damage to remote branches, such as "origin". Committing anything to "origin" would break fetching. In this case, git-fetch should be allowed to override the lock after checking .git/remotes, but other git commands should respect the lock.

It should be possible to break locks, but the users would at least think before doing so.

-- 
Regards,
Pavel Roskin
Catalin Marinas· May 8, 2006, 10:45 UTC · re: Pavel Roskin · lore

Re: Locking a branch

Pavel Roskin <proski@gnu.org> wrote:
Show 6 quoted lines
> I see there is an active discussion about branch attributes.  It
> would be nice to have an attribute to prevent git from changing the
> branch head in any way.  The reason is that it interferes with StGIT
> on StGIT managed branches.  If StGIT is fine with the change, it
> would remove or override the lock temporarily.  StGIT could also
> unlock the branch permanently if there are no applied patches.

I'm fine with this. At the moment, StGIT does extra checking before some of the commands to ensure that HEAD is the same as the top of the stack (i.e. no commits were generated outside stg commands). While I'll probably still keep this check, the addition would be useful for people mixing GIT and StGIT commands (I personally try to stay with StGIT commands as much as possible).

-- 
Catalin

← back to recent threads