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

Re: [PATCH 1/2] Add "--only-untracked" flag to status commands.

From
VJVäinö Järvelä <v@pp.inet.fi>
Date
Aug 25, 2007, 05:37 UTC
Message-ID
<133074BD-C29D-437A-8533-96A601AFC294@pp.inet.fi>
In-Reply-To
<20070824223338.GA13209@steel.home>
On Aug 25, 2007, at 01:33, Alex Riesen wrote:
Show 23 quoted lines
> Väinö Järvelä, Fri, Aug 24, 2007 08:35:13 +0200:
>> On Aug 23, 2007, at 23:32, Alex Riesen wrote:
>>
>>> Väinö Järvelä, Thu, Aug 23, 2007 21:58:31 +0200:
>>>> With this flag, the user can choose to filter untracked files from
>>>> the
>>>> status output. This can be used to either speed up the status
>>>> output, as
>>>> the untracked files are not fetched at all, or to just cleanup the
>>>> output without using gitignore.
>>>
>>> "git diff -r --name-status; git diff --cached -r --name-status" is
>>> not enough?
>>
>> That line will result in duplicate entries, if files are staged, and
>> the output of git-status is neater (but longer) in my opinion.
>
> That is because it _is_ two times different: between working directory
> and the index, and between index and HEAD. git-status _will_ show you
> the same for the same reason.
>
> Besides, why do you want to hide this "duplication"? It shows how the
> matters really are.

git status --only-tracked, does not hide the fact that there are files staged for commit, and modified files relative to the index. The difference is, that it shows them in a clean way. Sure you could make a script like:

echo "Changes to be committed:"; git diff --cached -r --name-status; echo "Changed but not updates:"; git diff -r --name-status

But that is quite long, for a quick look at the state, without any untracked files.

>
> Besides, it looks like you are using "friendly" where you actually
> wanted to say "I consider you too dumb to know what happens". Someone
> may feel offended

I don't see where I consider users dumb, but hey, I'm sorry if I made someone feel offended.

-- Väinö

Previous: Alex RiesenNext: Junio C Hamano
Message 16 of 17 in “Re: [PATCH 1/2] Add "--only-untracked" flag to status commands.”
  1. Alex RiesenAug 23, 2007
  2. Väinö JärveläAug 24, 2007
  3. Jakub NarebskiAug 24, 2007
  4. Andreas EricssonAug 27, 2007
  5. Junio C HamanoAug 24, 2007
  6. Väinö JärveläAug 24, 2007
  7. Johannes SchindelinAug 24, 2007
  8. Väinö JärveläAug 24, 2007
  9. Johannes SchindelinAug 25, 2007
  10. Matthieu MoyAug 24, 2007
  11. Jakub NarebskiAug 24, 2007
  12. Junio C HamanoAug 24, 2007
  13. Väinö JärveläAug 25, 2007
  14. Johannes SchindelinAug 25, 2007
  15. Alex RiesenAug 24, 2007
  16. Väinö JärveläAug 25, 2007
  17. Junio C HamanoAug 25, 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.