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

Re: Git enhancement request - checkout (clone) set modified dates to commit date

From
Jacob Keller <jacob.keller@gmail.com>
Date
Apr 23, 2018, 03:32 UTC
Message-ID
<CA+P7+xr99UyLVOrRYxRV=s8o5eJXzvOxZy5w51_FY_BYOue=VA@mail.gmail.com>
In-Reply-To
<3BCD276C-BC6B-47BD-A27C-05D7C0C07280@schemaczar.com>
On Sun, Apr 22, 2018 at 5:23 PM, Andrew Wolfe <andrew@schemaczar.com> wrote:
Show 5 quoted lines
> Kevin, thanks for your feedback.
>
> You have a reasonable point, because usually you don't put the outputs of a build into version control, but the build script checks them for being current.
>
> On the other hand, when you change branches, your existing output directories are worthless problems anyway — even if you have all the interdependencies correct.  Because of this, I'm inclined to consider this use case as intrinsically hazardous.  When I do a checkout, I always want to purge all the intermediate and end targets regardless.

Not every build has this problem, and certainly I think some of the most common build software would not (Make). It's fairly easy to fix this by using a git hook to update files post checkout (you can look up the timestamp of each file's commit time, or any other time and use touch to do this yourself).

Thanks, Jake

Previous: Andrew Wolfe
Message 6 of 6 in “Git enhancement request - checkout (clone) set modified dates to commit date”
  1. Andrew WolfeApr 22, 2018
  2. brian m. carlsonApr 22, 2018
  3. Andrew WolfeApr 22, 2018
  4. Kevin DaudtApr 22, 2018
  5. Andrew WolfeApr 23, 2018
  6. Jacob KellerApr 23, 2018

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.