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

Re: why git-reset needed after "cp -a" of a git repo?

From
JFJ. Bruce Fields <bfields@fieldses.org>
Date
Aug 22, 2007, 20:14 UTC
Message-ID
<20070822201435.GK20946@fieldses.org>
In-Reply-To
<200708221919.l7MJJNkX012184@agora.fsl.cs.sunysb.edu>
On Wed, Aug 22, 2007 at 03:19:23PM -0400, Erez Zadok wrote:
Show 5 quoted lines
> Thanks for the info and tips.  It's a good idea of course to detect any
> possible changes, but I wonder if for those of us who know what they're
> doing (i.e., living on the edge :-), there could be an option to ignore
> inode numbers and just depend on good 'ol ctime/mtime (as other tools like
> make do).

I don't think there's any need for that. You can always just run git-update-index --refresh or just git-status to refresh the stat data that's kept in the index. That miscellaneous stat data (ctime, mtime, inode number) is just there as an optimization, so git-diff doesn't have to read every file. It can be tossed out and regenerated any time.

--b.
Previous: Erez Zadok
Message 5 of 5 in “why git-reset needed after "cp -a" of a git repo?”
  1. Erez ZadokAug 22, 2007
  2. Jon LoeligerAug 22, 2007
  3. Linus TorvaldsAug 22, 2007
  4. Erez ZadokAug 22, 2007
  5. J. Bruce FieldsAug 22, 2007

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.