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

Locking a branch

From
PRPavel Roskin <proski@gnu.org>
Date
May 7, 2006, 02:50 UTC
Message-ID
<1146970243.24434.77.camel@dv>
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
Next: Catalin Marinas
Message 1 of 2 in “Locking a branch”
  1. Pavel RoskinMay 7, 2006
  2. Catalin MarinasMay 8, 2006

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.