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

Re: [suggestion] Include commit-ish in git status output

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 7, 2017, 22:53 UTC
Message-ID
<xmqq4ltjng6m.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CACcTrKewZRZpHotZ8GpO9zFifTdjkzP2th=KqkQqTvJb_k3W9w@mail.gmail.com>
Mahmoud Al-Qudsi <mqudsi@neosmart.net> writes:
Show 5 quoted lines
> Looking back, I probably should have started with that. `git
> status` gives the status of the _relative_ current state of the
> local repository without printing any information that can be used
> as an _absolute_ reference to "frame" the results of the `git
> status` command.

Yeah, that may be a good characterization of what 'git status' does. Another thing is that it gives only a summary. It may say "this and that path were changed", but it does not exactly say "how" they were changed. So from that point of view, even if you know which absolute reference the status of the working tree and the index being reported is relative to, it still does not give you much for you to be able to reproduce the exact state. That is not the purpose of the tool---it is to help the user who is aware of where s/he started from.

Show 5 quoted lines
> If I run `git status`, make, commit, and push some changes, then
> run `git status` once more, the output of the command can be
> identical to the previous run, _even though the actual state of
> the repo has changed_ which is... less than useful and potentially
> misleading.
I do not quite understand why it is misleading.
Previous: Mahmoud Al-Qudsi
Message 6 of 6 in “[suggestion] Include commit-ish in git status output”
  1. Mahmoud Al-QudsiJun 15, 2017
  2. Samuel LijinJun 15, 2017
  3. Mahmoud Al-QudsiJun 16, 2017
  4. Junio C HamanoJun 16, 2017
  5. Mahmoud Al-QudsiAug 7, 2017
  6. Junio C HamanoAug 7, 2017

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.