From: Junio C Hamano <hidden> Date: 2016-08-11 19:59:14
Johannes Schindelin [off-list ref] writes:
On Tue, 5 Dec 2006, Junio C Hamano wrote:
...
quoted
The current use of "git status" inside "git commit" needs to be revamped
if we pursue this further, though. Because one of the points the "what
state is this repository in" check "explain" does is to define what
operations are sensible in each state, and most likely in many state it
would not make _any_ sense to run "git commit" (say, in the middle of
"bisect").
That is right, but it is only a matter of having a command line switch to
suppress what you do not need for the commit message. After all, "status"
really should tell you about the status of the working directory. The fact
that we have the _same_ script for "commit" and "status" is no excuse!
Sure. The way I envisioned it was that we would have a moral
equivalent of current git-status output for explanation of the
base state.
I originally wanted to do "git oops" which would have been a
universal "undo" command, and "explain" was only the first
smaller step toward that goal. But the more I think about it, I
feel that "undo" is less important.
From: Carl Worth <hidden> Date: 2016-08-11 19:42:26
On Tue, 05 Dec 2006 15:57:00 -0800, Junio C Hamano wrote:
I originally wanted to do "git oops" which would have been a
universal "undo" command, and "explain" was only the first
smaller step toward that goal. But the more I think about it, I
feel that "undo" is less important.
I like the idea of "git status" explaining what operations are "in
progress" and what the user might want to do next to complete the
operation.
As for the desire for "undo", it probably makes sense to just keep
focusing on making "git reset" a nice, safe way to undo any sort of
"in progress" operation. The recent cleanup patches are in line with
this.
One thing that conflicts with that goal a bit is that git-reset is
also used to move the current branch arbitrarily in the commit DAG,
and also (with --hard) to discard local commits. Those are definitely
less "safe" operations.
-Carl
From: Johannes Schindelin <hidden> Date: 2016-08-11 20:11:55
Hi,
On Tue, 5 Dec 2006, Junio C Hamano wrote:
But the more I think about it, I feel that "undo" is less important.
Me, too. I was really astonished that people said -- after quite some
explanations -- "wow, you mean I did not lose any work?"
That's the nice thing about git: it is really hard to lose any objects.
Unless you explicitely issue a "git prune", you can resurrect whatever was
your state.
In this spirit, maybe it is time to enable reflog per default?
Ciao,
Dscho