Thread (14 messages) flat view 14 messages, 5 authors, 2016-06-15

Re: non-empty index with git commit -a

From: Jeff King <hidden>
Date: 2016-06-15 22:50:34

On Wed, Feb 16, 2011 at 09:58:52AM +0000, Sverre Rabbelier wrote:
On Wed, Feb 16, 2011 at 09:54, Jeff King [off-list ref] wrote:
quoted
So? Your question was whether index state is precious. If it's precious,
shouldn't we be keeping a history of it?
I don't think it's quite _that_ precious, but the only operation that
I regularly use that can blow away my carefully constructed index as
side effect of doing something else is `git commit -a`.
OK, so how precious is it? :)

If you want to have an option that specifically prevents the "git commit
-a" muscle memory thing, then go for it. I'm guessing it is the most
common "oops" one. Even with an index reflog, you might want it on top.

But it just seems silly to me to not protect at the same time against
the other ways you can lose state from the index.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help