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

Re: Darcs-git: a few notes for Git hackers

From
Petr Baudis <pasky@ucw.cz>
Date
May 9, 2005, 21:28 UTC
Message-ID
<20050509212842.GC15712@pasky.ji.cz>
In-Reply-To
<7ihdhc5le2.fsf@lanthane.pps.jussieu.fr>

Dear diary, on Mon, May 09, 2005 at 08:01:25PM CEST, I got a letter where Juliusz Chroboczek <Juliusz.Chroboczek@pps.jussieu.fr> told me that...

Show 10 quoted lines
> 1. Darcs-git uses the fact that Git updates are atomic when reading
> from a Git repository.  Darcs-git almost writes to Git repositories
> atomically, with one exception: it performs a non-atomic
> read/update/write cycle on .git/HEAD.
> 
> For that reason, I'm taking a high-level lock on .git repositories
> whenever I write them.  The lockfile is ``.git/lock''.  I haven't
> thought about whether Darcs can be easily coerced into accessing Git
> repos atomically; have people writing Git wrappers found the need for
> a global lock?

FWIW, Cogito does not lock at all yet - this is one of the things which should be fixed soon.

>  - there's no way to have multiple simultaneous caches, short of
>    hacking at the values of Git's global variables by hand.

See the Brad Robert's patches of Apr 21. I've decided not to apply them since it appears a lot has changed since then and it would be some pain; but they may be a worthy starting point for a more up-to-date patch.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor
Previous: Juliusz ChroboczekNext: Juliusz Chroboczek
Message 2 of 12 in “Darcs-git: a few notes for Git hackers”
  1. Juliusz ChroboczekMay 9, 2005
  2. Petr BaudisMay 9, 2005
  3. Juliusz ChroboczekMay 9, 2005
  4. H. Peter AnvinMay 9, 2005
  5. Juliusz ChroboczekMay 9, 2005
  6. H. Peter AnvinMay 9, 2005
  7. Juliusz ChroboczekMay 9, 2005
  8. Brad RobertsMay 9, 2005
  9. Petr BaudisMay 9, 2005
  10. Junio C HamanoMay 9, 2005
  11. Brad RobertsMay 10, 2005
  12. Daniel BarkalowMay 10, 2005

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.