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

Re: More problems...

From
RARyan Anderson <ryan@michonline.com>
Date
Apr 29, 2005, 19:50 UTC
Message-ID
<20050429195055.GE1233@mythryan2.michonline.com>
In-Reply-To
<20050429182708.GB14202@pasky.ji.cz>
On Fri, Apr 29, 2005 at 08:27:08PM +0200, Petr Baudis wrote:
Show 16 quoted lines
> Dear diary, on Fri, Apr 29, 2005 at 06:01:27PM CEST, I got a letter
> where Russell King <rmk@arm.linux.org.uk> told me that...
> > rmk@dyn-67:[linux-2.6-rmk]:<1049> cg-update origin
> > `../linux-2.6/.git/objects/00/78aeb85737197a84af1eeb0353dbef74427901' -> `.git/objects/00/78aeb85737197a84af1eeb0353dbef74427901'
> > cp: cannot create link `.git/objects/00/78aeb85737197a84af1eeb0353dbef74427901': File exists
> > 
> > By that time, the object files in the reference tree appear to have
> > a newer timestamp than the corresponding ones in my local tree, and
> > cp -lua fails.
> 
> I'm now away ,unfortunately, and no immediate idea stems to my mind on
> how to fix it. Ideas welcomed - I need to hardlink missing entries from
> one tree to another; it would be enough to be able to just tell cp to
> ignore already present files.
> 
> Could you please try to give cp the -f flag?

Why not just use "rsync" for both remote and local synchronization, and provide a "relink" command to scan two .git/objects/ repositories and hardlink matching files together?

With the SHA1 hash, you can even have a --unsafe option that just compares the has names and does a link based purely off of that and the stat(2) results of both files. (I'd expect that a ... safer variant would extract both files and compare them, but the --unsafe should be sufficient, in practice, I would think.)

-- 
Ryan Anderson
  sometimes Pug Majere
Previous: Petr BaudisNext: Thomas Glanzmann
Message 5 of 24 in “More problems...”
  1. Russell KingApr 29, 2005
  2. Russell KingApr 29, 2005
  3. Linus TorvaldsApr 29, 2005
  4. Petr BaudisApr 29, 2005
  5. Ryan AndersonApr 29, 2005
  6. Thomas GlanzmannApr 29, 2005
  7. Linus TorvaldsApr 29, 2005
  8. Junio C HamanoApr 29, 2005
  9. Russell KingApr 29, 2005
  10. Anton AltaparmakovApr 29, 2005
  11. Petr BaudisMay 2, 2005
  12. Dave KleikampMay 2, 2005
  13. Thomas GlanzmannMay 2, 2005
  14. Anton AltaparmakovMay 2, 2005
  15. Linus TorvaldsMay 2, 2005
  16. Petr BaudisMay 3, 2005
  17. Daniel BarkalowMay 3, 2005
  18. Andreas GalMay 3, 2005
  19. Junio C HamanoMay 3, 2005
  20. Daniel BarkalowApr 29, 2005
  21. Junio C HamanoApr 29, 2005
  22. Split out "pull" from particular methodsDaniel Barkalow, Apr 30, 2005
  23. Add git-relink-script, a tool to hardlink two existing repositories.Ryan Anderson, May 4, 2005
  24. Petr BaudisMay 2, 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.