summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2021-09-14 09:44:52 -0400
committerEdward Thomson <ethomson@edwardthomson.com>2021-09-18 08:32:41 -0400
commit323f222f7ec8967f8610b603a67959215d3a5b1f (patch)
tree8cd84d3edb4e92272f29315b990b53c476112dfa /include/git2
parentc443495bd36ef2a22d3828d449d4f03c85464cf6 (diff)
downloadlibgit2-323f222f7ec8967f8610b603a67959215d3a5b1f.tar.gz
email: include binary diffs by default
`git format-patch` includes binary diffs by default when creating emails. Match this behavior.
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/email.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/include/git2/email.h b/include/git2/email.h
index 48715fe76..4b2d70ead 100644
--- a/include/git2/email.h
+++ b/include/git2/email.h
@@ -64,12 +64,16 @@ typedef struct {
size_t reroll_number;
} git_email_create_options;
+/*
+ * By default, our options include binary diffs to match `git format-patch`.
+ */
#define GIT_EMAIL_CREATE_OPTIONS_VERSION 1
-#define GIT_EMAIL_CREATE_OPTIONS_INIT { \
- GIT_EMAIL_CREATE_OPTIONS_VERSION, \
- GIT_EMAIL_CREATE_DEFAULT, \
- GIT_DIFF_OPTIONS_INIT \
- }
+#define GIT_EMAIL_CREATE_OPTIONS_INIT \
+{ \
+ GIT_EMAIL_CREATE_OPTIONS_VERSION, \
+ GIT_EMAIL_CREATE_DEFAULT, \
+ { GIT_DIFF_OPTIONS_VERSION, GIT_DIFF_SHOW_BINARY, GIT_SUBMODULE_IGNORE_UNSPECIFIED, {NULL,0}, NULL, NULL, NULL, 3 } \
+}
/**
* Create a diff for a commit in mbox format for sending via email.