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

Re: [PATCH] Teach git-stash to "apply --index"

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:19

Johannes Schindelin [off-list ref] writes:
	I am not quite sure if this should not be the default, with
	--skip-index to turn it off if the trivial index merge fails,
	and the user might be interested only in the working directory
	changes anyway.

	Comments?
There is a bit of impedance mismatch between a rename-aware
three-way merge (aka merge-recursive) used to update the working
tree and a patch that updates the index.  The "rename-aware"
thing can be fixed by doing the diff with -M, though.

It might be easier to explain (1) not have --index option, but
attempt to do this always, and (2) even if the index cannot be
updated, keep going, without worrying about losing the
difference between I and W, probably with a message to the end
user.

Suppose you are the user who gets "perhaps you would want to run
without --index?" hint.  What can you do?  Run without --index,
or forget about unstashing.  But the latter does not sound like
an option.  So it feels to me that --index is an unnecessary
option.

The potential confusion problem I mentioned in two of my earlier
messages due to the program doing one thing sometimes and
another thing some other times still applies, though.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help