git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: stash-p broken?

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 29, 2014, 18:23 UTC
Message-ID
<xmqqwqaw2fe3.fsf@gitster.dls.corp.google.com>
In-Reply-To
<20140729174357.GA20042@peff.net>
Jeff King <peff@peff.net> writes:
Show 23 quoted lines
> On Tue, Jul 29, 2014 at 10:00:22AM -0700, Junio C Hamano wrote:
>
>> Jeff King <peff@peff.net> writes:
>> 
>> > So perhaps we could do something better on the viewing side, and
>> > "simplify" combined merges for files with all-identical parents.
>> 
>> Or you can ask to show the difference with the first parent, no?
>
> Yeah, though there is no way to do the other thing (--second-parent to
> show only the index side). I doubt anybody wants that, though. Just
> passing --first-parent would probably be fine (that would match "git
> stash show", too, though like that "stash show" it is impossible to
> override to see the index portion then).
>
> But...
>
>> I do not think giving a single-parent diff when --cc/-c is asked
>> for, which is a clear indication that the caller is aware that the
>> commit in question is a merge, is such a good idea.
>
> I think that is my point, though. The user is _not_ aware that the
> commit in question is a merge.

Oh, don't get me wrong. I am not opposed to give better output from "stash show -p". I do not want to see us change what "git log --cc" does without being asked to do something different.

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"?

Previous: Jeff KingNext: Jeff King
Message 8 of 12 in “stash-p broken?”
  1. Michael MigdolJul 29, 2014
  2. Michael MigdolJul 29, 2014
  3. brian m. carlsonJul 29, 2014
  4. Øystein WalleJul 29, 2014
  5. Jeff KingJul 29, 2014
  6. Junio C HamanoJul 29, 2014
  7. Jeff KingJul 29, 2014
  8. Junio C HamanoJul 29, 2014
  9. Jeff KingJul 31, 2014
  10. Junio C HamanoJul 31, 2014
  11. Junio C HamanoJul 29, 2014
  12. Jeff KingJul 31, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.