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

Re: checkout-cache -f: a better way?

From
Junio C Hamano <junkio@cox.net>
Date
May 20, 2005, 22:38 UTC
Message-ID
<7vacmpsetb.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<428E5102.60003@pobox.com>
>>>>> "JG" == Jeff Garzik <jgarzik@pobox.com> writes:

JG> Being a weirdo, I don't use cogito for kernel development, just git JG> itself.

My customer, in other words ;-).

JG> git-read-tree $(cat .git/HEAD) && \ JG> git-checkout-cache -q -f -a && \ JG> git-update-cache --refresh

I have to check checkout-cache.c, but assuming that you start from an already populated work tree with a valid cache when you do the git-read-tree at the third line from the last, using "git-read-tree -m HEAD" (you do not need to say $(cat .git/HEAD) in the modern git anymore) would be a good place to start.

Also the modern git-checkout-cache has a '-u' option and with it you should not need 'git-update-cache --refresh' after that.

Let me know if you have any problems. Single tree '-m' is what Linus did and '-u' option to git-checkout-cache is mine.

Previous: Jeff GarzikNext: Jeff Garzik
Message 2 of 11 in “checkout-cache -f: a better way?”
  1. Jeff GarzikMay 20, 2005
  2. Junio C HamanoMay 20, 2005
  3. Jeff GarzikMay 20, 2005
  4. Junio C HamanoMay 20, 2005
  5. Jeff GarzikMay 20, 2005
  6. Linus TorvaldsMay 21, 2005
  7. Jeff GarzikMay 21, 2005
  8. Linus TorvaldsMay 20, 2005
  9. Linus TorvaldsMay 20, 2005
  10. Jeff GarzikMay 20, 2005
  11. Junio C HamanoMay 20, 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.