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

Re: Interest in locking mechanism?

From
Martin Langhoff <martin.langhoff@gmail.com>
Date
Jan 12, 2010, 19:26 UTC
Message-ID
<46a038f91001121126t6b2bdd36vfe5ed44291644ab9@mail.gmail.com>
In-Reply-To
<1263323292-sup-4182@ezyang>
On Tue, Jan 12, 2010 at 8:11 PM, Edward Z. Yang <ezyang@mit.edu> wrote:
> I would like to respectfully disagree.  I want to use git because:

I have to say, Avery's got a very good point, and my position (as a cross SCM user) is that he's right. But I have two suggestions that might work to at least try out what you say you want...:

 - Write a wrapper around your editor invokation to call `flock $EDITOR $@`
 - Use rcs on top of git, just for the locking -- write a commit hook
that auto-commits to rcs when you commit to git; add suitable excludes
so git doesn't worry about ,v files.
And a comment on your points -
>    * I use Git on a regular basis, and do not use RCS.  I constantly
>      have to go digging through the manpages when I occasionally do
>      stumble upon an RCS system.  Interface familiarity is nice.

that's very weak. Write your our wrappers that mimic git commands you want to use...

>    * Putting it in Git means that you can easily grow; you can decide
>      "Hey, maybe we want to do branchy development" and just do it,
>      rather than have to drum up the activation energy to do an
>      rcsimport
"Drum up the energy" is somewhat exaggerated ;-)
>    * If code is deployed in a production context as a Git checkout,

If that's what you are doing (or will be doing), just drop rcs, and explore workflows that help bring attention to any case where there were edits on the same file.

Actually -- you can focus on workflows that prevent or highlight cases where the same file is "being edited" in a pre-commit hook that checks and warns...

 - if new commits (on the matching branch) touch the file (evil: will
have to do git-fetch)
 - if the file was committed recently by a different committer
 - if we're committing a merge involving files changing on more than
one of the heads involved (this case can sometimes be auto-merged with
a diff3-like algorythm)
maybe something on that track helps
m
-- 
 martin.langhoff@gmail.com
 martin@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
Previous: Avery Pennarun
Message 11 of 11 in “Interest in locking mechanism?”
  1. Edward Z. YangJan 12, 2010
  2. B Smith-MannschottJan 12, 2010
  3. Edward Z. YangJan 12, 2010
  4. Tomas CarneckyJan 12, 2010
  5. Avery PennarunJan 12, 2010
  6. Edward Z. YangJan 12, 2010
  7. Avery PennarunJan 12, 2010
  8. Martin LanghoffJan 12, 2010
  9. Edward Z. YangJan 12, 2010
  10. Avery PennarunJan 12, 2010
  11. Martin LanghoffJan 12, 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.