summaryrefslogtreecommitdiff
path: root/revision.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-03-08 23:27:25 -0800
committerJunio C Hamano <gitster@pobox.com>2010-03-09 01:11:18 -0800
commitb44900599710c700c1bf164d3753eb7f8eb6c18a (patch)
tree7074d319cc73aed1a3ba26afe549fd584d0c1fda /revision.h
parent32962c9bd5149005b163dff230670872eb99286a (diff)
downloadgit-b44900599710c700c1bf164d3753eb7f8eb6c18a.tar.gz
show -c: show patch text
Traditionally, "show" defaulted to "show --cc" (dense combined patch), but asking for combined patch with "show -c" didn't turn the patch output format on; the placement of this logic in setup_revisions() dates back to cd2bdc5 (Common option parsing for "git log --diff" and friends, 2006-04-14). This unfortunately cannot be done as a trivial change of "if dense combined is asked, default to patch format" done in setup_revisions() to "if any combined is asked, default to patch format", as "diff-tree -c" needs to default to raw, while "diff-tree --cc" needs to default to patch, and they share the codepath. These command specific defaults are now handled in the new "tweak" callback that can be customized by individual command implementations. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'revision.h')
-rw-r--r--revision.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/revision.h b/revision.h
index fcc0de8eea..ceae4cae74 100644
--- a/revision.h
+++ b/revision.h
@@ -139,6 +139,7 @@ extern volatile show_early_output_fn_t show_early_output;
struct setup_revision_opt {
const char *def;
+ void (*tweak)(struct rev_info *, struct setup_revision_opt *);
};
extern void init_revisions(struct rev_info *revs, const char *prefix);