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

On refreshing the index

From
Sergio Callegari <sergio.callegari@gmail.com>
Date
Mar 11, 2010, 18:19 UTC
Message-ID
<loom.20100311T191149-453@post.gmane.org>
Hi,

I have recently received instructions on how to refresh the index... However, it looks like I've run into a case where the refresh is not as successful as expected...

Here it is

If I run git status, git runs filters on a couple of opendocument files for which a filter is defined

GIT_TRACE=1 git status trace: built-in: git 'status' trace: run_command: 'rezip -p ODF_UNCOMPRESS2' trace: exec: 'sh' '-c' 'rezip -p ODF_UNCOMPRESS2' 'rezip -p ODF_UNCOMPRESS2' trace: run_command: 'rezip -p ODF_UNCOMPRESS2' trace: exec: 'sh' '-c' 'rezip -p ODF_UNCOMPRESS2' 'rezip -p ODF_UNCOMPRESS2' # On branch M05 # Untracked files: # (use "git add <file>..." to include in what will be committed) # # WIP/ # program.txt # program.txt~ nothing added to commit but untracked files present (use "git add" to track)

 ... but there is actually nothing new...
 so I try to update the index

GIT_TRACE=1 git update-index --refresh trace: built-in: git 'update-index' '--refresh' trace: run_command: 'rezip -p ODF_UNCOMPRESS2' trace: exec: 'sh' '-c' 'rezip -p ODF_UNCOMPRESS2' 'rezip -p ODF_UNCOMPRESS2' trace: run_command: 'rezip -p ODF_UNCOMPRESS2' trace: exec: 'sh' '-c' 'rezip -p ODF_UNCOMPRESS2' 'rezip -p ODF_UNCOMPRESS2'

Is now status any faster?

GIT_TRACE=1 git status trace: built-in: git 'status' trace: run_command: 'rezip -p ODF_UNCOMPRESS2' trace: exec: 'sh' '-c' 'rezip -p ODF_UNCOMPRESS2' 'rezip -p ODF_UNCOMPRESS2' trace: run_command: 'rezip -p ODF_UNCOMPRESS2' trace: exec: 'sh' '-c' 'rezip -p ODF_UNCOMPRESS2' 'rezip -p ODF_UNCOMPRESS2' # On branch M05 # Untracked files: # (use "git add <file>..." to include in what will be committed) # # WIP/ # program.txt # program.txt~ nothing added to commit but untracked files present (use "git add" to track)

No, the filters are run all the same... What about git diff?

GIT_TRACE=1 git diff trace: built-in: git 'diff' trace: run_command: 'less' trace: exec: 'less' trace: run_command: 'rezip -p ODF_UNCOMPRESS2' trace: exec: 'sh' '-c' 'rezip -p ODF_UNCOMPRESS2' 'rezip -p ODF_UNCOMPRESS2' trace: run_command: 'rezip -p ODF_UNCOMPRESS2' trace: exec: 'sh' '-c' 'rezip -p ODF_UNCOMPRESS2' 'rezip -p ODF_UNCOMPRESS2'

... really there is no change ... But git keeps running the filters on these two files (note that there are other OO files in the repo, and with the others, the filters are not run).

This happened on 1.7.0.2 after switching branches.
Sergio
Next: Junio C Hamano
Message 1 of 3 in “On refreshing the index”
  1. Sergio CallegariMar 11, 2010
  2. Junio C HamanoMar 13, 2010
  3. Sergio CallegariMar 15, 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.