On Tue, Jul 29, 2014 at 11:23:16AM -0700, Junio C Hamano wrote:

> I see you added --simplify-combined-diffs to avoid breaking "log",
> so that is not too bad, but I am still unsure what should happen
> when the first parent and the result is the same and only the second
> parent is different (i.e. you have changes in the index and your
> working tree changes have been reverted---then you create a stash).
> Should it show as "single source diff, with all changes reverted"?
> Should it show as a normal "combined diff for a merge"?  Should it
> show as "no changes whatsoever"?

Interesting question. I think right now we would show nothing in the
combined diff, as we simply took one side. This is really showing the
weakness of the "stash is a merge" storage format. If we use it as a
storage format, and pick it apart in "git stash", that's fine. But as
soon as we start treating it like a real merge and expecting "git log"
to behave, the cracks begin to show.

Hmph. To be honest, I am starting to wonder if implying "--first-parent"
is a more sensible option for "stash list". It matches "stash show", at
least, and it is not unreasonable to simply present the changes in the
working tree by default, and ignore the index. People who are more
clueful can pick apart the commits using "git log" themselves.

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to