Thread (1 message) 1 message, 1 author, 2017-08-07

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

From: Junio C Hamano <hidden>
Date: 2017-08-07 22:53:21

Mahmoud Al-Qudsi [off-list ref] writes:
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.
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help