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
Kevin Daudt <me@ikke.info>
Date
Apr 22, 2018, 19:59 UTC
Message-ID
<20180422195923.GA10082@alpha>
In-Reply-To
<1FCE6958-FC75-4A9B-88A3-05AE991815E4@schemaczar.com>
On Sun, Apr 22, 2018 at 03:01:10PM -0400, Andrew Wolfe wrote:
Show 11 quoted lines
> Hi Brian,
> 
> Not completely sure what you're saying.  If the files on master are
> not changed, the changed files' commit timestamps will be older than
> the branch commit timestamps.
> 
> However, if I check out master after committing to a branch, the
> modifications will necessarily disappear because they haven't been
> committed to master.  Instead, under my proposal, each will get the
> timestamp of its prior commit.
> 

Say I build the project while on a certain branch. Then I checkout a different branch and build again. You would expect that the targets of every source file that have changed are rebuilt.

When you would restore the timestamp back to the commit timestamp, the timestamp will be older then the target, and make will not rebuild it, leaving you with outdated build targets.

Previous: Andrew WolfeNext: Andrew Wolfe
Message 4 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.