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

Re: RFC: checkout/temporary branch switch restoring modification times

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Oct 4, 2010, 05:00 UTC
Message-ID
<AANLkTinXbwtv=6TMeu0nA=jV4u7zGXE_56791ky_=93b@mail.gmail.com>
In-Reply-To
<4CA95B18.5090008@cockos.com>
On Mon, Oct 4, 2010 at 04:42, Justin Frankel <justin@cockos.com> wrote:
Show 9 quoted lines
> I often find myself wanting to switch temporarily to another branch, and
> then back to my original branch, but what I find is that my build tools
> such as MSVC or Xcode) notice the file modification times changed on
> the changed files, and then want to rebuild, even though the contents of
> the files are the same.
>
> I've implemented a perl script (tested on OSX and msysGit), which I've
> named "git-cop" (so I can use via "git cop") to checkout,
> preserving file modification times.

Maybe something like this is a worthwhile feature, although perhaps it would be better to give each file a timestamp corresponding to when it was last modified in Git? That would break in many cases, but a scheme like this inherently does.

Have you tried to use ccache? It should reduce your build times by a lot, so perhaps if you use it you won't need this anymore.

Previous: Justin FrankelNext: Jonathan Nieder
Message 2 of 4 in “RFC: checkout/temporary branch switch restoring modification times”
  1. Justin FrankelOct 4, 2010
  2. Ævar Arnfjörð BjarmasonOct 4, 2010
  3. Jonathan NiederOct 4, 2010
  4. Justin FrankelOct 4, 2010

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.