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

Re: naive question

From
Petr Baudis <pasky@ucw.cz>
Date
Apr 19, 2005, 17:15 UTC
Message-ID
<20050419171534.GH12757@pasky.ji.cz>
In-Reply-To
<16997.222.917219.386956@cargo.ozlabs.ibm.com>

Dear diary, on Tue, Apr 19, 2005 at 03:00:14PM CEST, I got a letter where Paul Mackerras <paulus@samba.org> told me that...

Show 8 quoted lines
> Is there a way to check out a tree without changing the mtime of any
> files that you have already checked out and which are the same as the
> version you are checking out?  It seems that checkout-cache -a doesn't
> overwrite any existing files, and checkout-cache -f -a overwrites all
> files and gives them the current mtime.  This is a pain if you are
> using make and your tree is large (like, for instance, the linux
> kernel :), because it means that after a checkout-cache -f -a you get
> to recompile everything.

Actually, to then get sensible show-diff output, you need to also update-cache --refresh to compensate for the changes. I personally really hate update-cache --refresh; sure, 0.1s with hot cache, but easily eats 5 minutes (!) with cold cache.

I'd actually prefer, if:

(i) checkout-cache simply wouldn't touch files whose stat matches with what is in the cache; it updates the cache with the stat informations of touched files

(ii) read-tree would take over the stat information from the matching files in previous cache.

This way, doing update-cache --refresh would become a rather rare event. Stuff would become swifter, faster, less I/O bound and you would get rid of problems as the one described above.

What do you think?
-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor
Previous: Ingo MolnarNext: Linus Torvalds
Message 4 of 6 in “naive question”
  1. Paul MackerrasApr 19, 2005
  2. David WoodhouseApr 19, 2005
  3. Ingo MolnarApr 19, 2005
  4. Petr BaudisApr 19, 2005
  5. Linus TorvaldsApr 19, 2005
  6. Linus TorvaldsApr 19, 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.