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

Re: svn to git, N-squared?

From
Llinux@horizon.com <linux@horizon.com>
Date
Jun 12, 2006, 04:39 UTC
Message-ID
<20060612043949.20992.qmail@science.horizon.com>
Show 9 quoted lines
>	for i in ??
>	do
>		cp -r $i $i.new
>		rm -rf $i
>		mv $i.new $i
>	done
>
> in your .git/objects/ directory (CAREFUL! Any script that does "rm -rf" 
> should be double- and triple-checked for sanity! ;)

Insanity is copying the data rather than just the file name. Git is good about not reading unnecessary files, and anything necessary should be cached, so on-disk fragmentation is not a concern.

rmdir --ignore-fail-on-non-empty ??	# Probably unnecessary.
for i in ??
do
	mkdir $i.new
	mv $i/* $i.new
	rmdir $i
	mv $i.new $i
done
Next: Jon Smirl
Message 1 of 14 in “Re: svn to git, N-squared?”
  1. linux@horizon.comJun 12, 2006
  2. Jon SmirlJun 12, 2006
  3. Linus TorvaldsJun 12, 2006
  4. Jon SmirlJun 12, 2006
  5. Linus TorvaldsJun 12, 2006
  6. Jon SmirlJun 12, 2006
  7. Jon SmirlJun 12, 2006
  8. Linus TorvaldsJun 12, 2006
  9. Linus TorvaldsJun 12, 2006
  10. Jon SmirlJun 12, 2006
  11. Linus TorvaldsJun 12, 2006
  12. Jon SmirlJun 12, 2006
  13. Jon SmirlJun 12, 2006
  14. Jon SmirlJun 12, 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.