Re: [PATCH v2 5/6] stash: default listing to "--cc --simplify-combined-diff"
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 29, 2014, 18:58 UTC
- Message-ID
- <xmqqppgo2dqr.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <20140729175725.GE31181@peff.net>
Jeff King <peff@peff.net> writes:
Show 9 quoted lines
> When you list stashes, you can provide arbitrary git-log > options to change the display. However, adding just "-p" > does nothing, because each stash is actually a merge commit. > > This implementation detail is easy to forget, leading to > confused users who think "-p" is not working. We can make > this easier by specifying "--cc" as a default ourselves > (which does nothing if no diff format is requested by the > user).
Sigh.
"git log --cc" is one of the things I wanted for a long time to fix. When the user explicitly asks "--cc", we currently ignore it, but because we know the user wants to view combined diff, we should turn "-p" on automatically. And the change this patch introduces will be broken when we fix "log --cc" ("stash list" will end up always showing the patch, without a way to disable it).
Can you make this conditional? Do this only when <options> are given to "git stash list" command and that includes "-p" or something?