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

Re: Subversion-style incrementing revision numbers

From
Shawn Pearce <spearce@spearce.org>
Date
Sep 19, 2006, 22:39 UTC
Message-ID
<20060919223905.GE11601@spearce.org>
In-Reply-To
<Pine.LNX.4.62.0609191525490.9752@joeldicepc.ecovate.com>
Joel Dice <dicej@mailsnare.net> wrote:
Show 8 quoted lines
> I'm not too worried about cg-admin-uncommit or git-reset, since the IRN 
> feature is intended mainly for shared repositories.  I would suggest that 
> such commands simply be disallowed for such repositories.
> 
> The problem of temporary commits certainly needs to be addressed.  In this 
> case, may I assume nothing under $GIT_DIR/refs is ever modified?  If so, 
> perhaps I could somehow hook into the git-update-ref step.  Is that what 
> the revlog code does?

$GIT_DIR/refs is always modified. Its probably the most heavily modified part of a GIT_DIR, aside from the index. Simply because the ref files must be modified every time a commit, fetch or merge completes. Its also a directory you don't want to delete; I once did an `rm -rf .git/refs` in a repository with a many branches. That was no fun to recover.

git-update-ref is used by pretty much all non-C code to update a ref file. The APIs it calls invoke the reflog code to record the update being made to the ref if the user has enabled logging on that ref (not all users want all refs logged apparently). I don't think its a great idea to plug more complex logic into that part of the system. The reflog code already made it more complex then it needed to be; Linus apparently just found out how heavily we use static buffers down there...

-- 
Shawn.
Previous: Johannes SchindelinNext: Jakub Narebski
Message 8 of 28 in “Subversion-style incrementing revision numbers”
  1. Joel DiceSep 19, 2006
  2. Petr BaudisSep 19, 2006
  3. Joel DiceSep 19, 2006
  4. Petr BaudisSep 19, 2006
  5. Joel DiceSep 19, 2006
  6. Shawn PearceSep 19, 2006
  7. Johannes SchindelinSep 19, 2006
  8. Shawn PearceSep 19, 2006
  9. Jakub NarebskiSep 19, 2006
  10. Linus TorvaldsSep 19, 2006
  11. Petr BaudisSep 19, 2006
  12. Linus TorvaldsSep 19, 2006
  13. Joel DiceSep 19, 2006
  14. Jakub NarebskiSep 20, 2006
  15. Joel DiceSep 20, 2006
  16. Junio C HamanoSep 20, 2006
  17. Robin RosenbergSep 20, 2006
  18. Petr BaudisSep 20, 2006
  19. Junio C HamanoSep 20, 2006
  20. Jakub NarebskiSep 19, 2006
  21. Petr BaudisSep 19, 2006
  22. Jakub NarebskiSep 19, 2006
  23. Joel DiceSep 19, 2006
  24. Shawn PearceSep 19, 2006
  25. Shawn PearceSep 19, 2006
  26. Joel DiceSep 19, 2006
  27. Shawn PearceSep 19, 2006
  28. Joel DiceSep 19, 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.