Thread (1 message) 1 message, 1 author, 2016-06-15

Re: git-ls-files --added?

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:46:49

Jon Seymour [off-list ref] writes:
Jakub,

Thanks - yes, I wasn't happy about parsing git status.

I am still interested in the rationale for git-ls-files not supporting
such an option directly, since git-diff still seems a little indirect.
Partly historical, but more fundamental reason is because ls-files
plumbing is about the index.

The index by definition knows about the work tree files.  Reporting the
status of work tree files by comparing what was added to the index makes
sense in that context.

git-ls-files documentation lists --cached/deleted...  and if you think
about them, you will realize that the all of them make sense; they are
about the index or comparison between the index and the work tree.

Added is _not_ about comparision between the index and the work tree.  It
is between the HEAD commit and the index, and it does not belong to
ls-files plumbing.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help