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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 16, 2017 at 4:41 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
>
> HEAD is, unless you are about to create a root commit, always a
> commit and not other kind of commit-ish, so there is no need to say
> "or commit-ish" here.

I apologize for my errant terminology, I thought commitish was what
the abbreviated
SHA1 was called. My proposal was to show either the full SHA1 or the abbreviated
SHA1 in the output of `git status`.

> What would you do differently, after seeing this random-looking
> 40-character string, based on what it is?  Do you know recent commit
> object names by heart and can tell, immediately when you see 88ce3...,
> "ah, that was me fixing foo", as opposed to e140f7a... that is a
> different change you can immediately identify?

I obviously do not know recent commits by heart - the aim is to be
able to easily
copy & paste or visually compare against another value.

Aside from the practical implications of having the commit SHA
included in the output
of `git status`, I have also pointed out my ideological reasons for
it. `git status` currently
prints an incomplete picture of the local repository state, and
without an indication of
_which_ commit HEAD currently is, the remainder of the content
"expires" and is of no
use at some later date.

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. The
relative state of a repository is useless for any sort of machine or
human analysis, since it
would require the state of both the cached remote and local indices to
be identical to be of
any use.

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.

Yes, anyone familiar with git knows that the output of `git status` is
only showing you a summary
of the diff of the working tree vs HEAD. My argument is that all it
would take is another 8 characters
appending to the "On branch xxxx" line to make it an infinitely more
useful command.

Thank you,

Mahmoud Al-Qudsi
NeoSmart Technologies



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux