summaryrefslogtreecommitdiff
path: root/builtin/stash.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-04-22 02:14:45 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-04-22 02:14:45 (GMT)
commit8aed8034be53fc67bbc470357b124abd5679fb91 (patch)
tree3b00c3d92e65611068406c491b1636bb5b7ecd80 /builtin/stash.c
parent0ba1ba4846aeb079b8eb1967a52917d32923a5ef (diff)
parent8e407bc817febdf1ff2edcce01945b3eac6d376b (diff)
downloadgit-8aed8034be53fc67bbc470357b124abd5679fb91.zip
git-8aed8034be53fc67bbc470357b124abd5679fb91.tar.gz
git-8aed8034be53fc67bbc470357b124abd5679fb91.tar.bz2
Merge branch 'tg/stash-in-c-show-default-to-p-fix'
A regression fix. * tg/stash-in-c-show-default-to-p-fix: stash: setup default diff output format if necessary
Diffstat (limited to 'builtin/stash.c')
-rw-r--r--builtin/stash.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/builtin/stash.c b/builtin/stash.c
index ca0b4cd..8b82053 100644
--- a/builtin/stash.c
+++ b/builtin/stash.c
@@ -761,6 +761,10 @@ static int show_stash(int argc, const char **argv, const char *prefix)
free_stash_info(&info);
usage_with_options(git_stash_show_usage, options);
}
+ if (!rev.diffopt.output_format) {
+ rev.diffopt.output_format = DIFF_FORMAT_PATCH;
+ diff_setup_done(&rev.diffopt);
+ }
rev.diffopt.flags.recursive = 1;
setup_diff_pager(&rev.diffopt);