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

git-diff-index -C problem

From
GSGovind Salinas <govindsalinas@gmail.com>
Date
Jun 18, 2007, 05:48 UTC
Message-ID
<69b0c0350706172248l6343e4c6yfd36ced8230a11ef@mail.gmail.com>

I am writing a porcelain for git and I have been playing with git-diff-index. I noticed that if i copy a file and git-add the copy it shows the file added, as i expect...

But then if i then say git-add on the original file, i expect that -C would check that file to see if it was copied, it does not. If i touch the file, then git detects the copy, so git-add is not forcing git to consider the file modified.

I would be happy if there was a way that I could tell git that a file was modified for this purpose. Otherwise I will have to open/close a file in which the user may be working, which I shouldn't do from my app (windows problem modifying open docs). Maybe make "git-add -f" do that?

Thanks, Govind.

Next: Shawn O. Pearce
Message 1 of 2 in “git-diff-index -C problem”
  1. Govind SalinasJun 18, 2007
  2. Shawn O. PearceJun 18, 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.