SIGN IN SIGN UP

fix(git): stop stash_show_wants_patch from swallowing -p as a log-only option's value

stash_show_wants_patch reused git log's separate-value grammar
(log_takes_value/log_takes_separate_value), under which --author is a
value-taking Long flag. git stash show's real grammar is much
narrower ([-u] <diff-options> [<stash>]) and doesn't recognize
--author at all -- confirmed against real git 2.53.0 that
`git stash show --author -p` produces full patch output, since
--author consumes no value there. The old code swallowed the
following -p as --author's value, causing patch content to render
through the stat-only compact_stash_stat path instead of compact_diff.

Now tokenizes with a predicate that never treats any flag as taking a
separate value, since this detector only needs to spot a bare
-p/-u/--patch token -- that can only ever false-positive, never
silently swallow a real one.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
N
Nicolas Le Cam committed
79f71fa1dfbbb0c96e7c739a7100cd916af718c3
Parent: 0a32e22