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

Re: git-ls-files handling of 'missing' files

From
Junio C Hamano <junkio@cox.net>
Date
Feb 14, 2006, 03:56 UTC
Message-ID
<7vpslqwq33.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.63.0602132126210.6352@gheavc.wnzcbav.cig>
Jon Nelson <jnelson-git@jamponi.net> writes:
> The documentation confuses me when it says that files marked with a 'K' 
> are "to be killed / other" - it don't understand why 'killed' and 
> 'other' are lumped together.

I think there is a typo in asciidoc source (probably ?:: is needed). Whenever you see funky things in the documentation please first check the Documentation/that-file.txt to see if you are just seeing a bad rendition of what was meant.

Show 5 quoted lines
> The docs for git-ls-files indicate that a file marked as 'killed' (wrong 
> tense?) is a file that needs to be removed for git-checkout-index to 
> succeed. The manpage doesn't say why git-checkout-index needs to succeed 
> or under what conditions git-checkout-index would be invoked. (ie, "why" 
> should I manually remove this file).

This was from long time ago so I may be misremembering things but it is for D/F conflicts. index has "doc/file1" stored but your working tree has a regular file doc. To check "doc/file1" out you would need to remove that file. Or index has a regular file "path2" stored when you have "path2/file2" on the working tree (hence path2 is a directory), in which case "path2/file2" needs to disappear.

> It seems to me that files can also exist in the state 'new' or 'added' 
> (is this the same as unmerged?) Is there a state for 'conflict'?

Remember, ls-files is about index vs working tree files. It works before your initial commit, and never looks at the HEAD commit. 'new' or 'added' has no meaning. working tree file is either known to be the same (thanks to stat information that is cached in the index), known to be different (ditto), or unknown (when stat information is stale), relative to index.

Unmerged and conflict should be the same, I think.
Previous: Jon Nelson
Message 2 of 2 in “git-ls-files handling of 'missing' files”
  1. Jon NelsonFeb 14, 2006
  2. Junio C HamanoFeb 14, 2006

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.