diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2021-09-14 09:49:31 -0400 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2021-09-18 08:32:41 -0400 |
| commit | 67b1d019a8ad93201c86d98d96782b13ba28fbbe (patch) | |
| tree | 966e52fc9e7d0dc8b096bdb332c868d59663c715 /include/git2 | |
| parent | 323f222f7ec8967f8610b603a67959215d3a5b1f (diff) | |
| download | libgit2-67b1d019a8ad93201c86d98d96782b13ba28fbbe.tar.gz | |
email: include renames by default
`git format-patch` includes diffs with rename detection enabled by
default when creating emails. Match this behavior.
Diffstat (limited to 'include/git2')
| -rw-r--r-- | include/git2/email.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/git2/email.h b/include/git2/email.h index 4b2d70ead..b56be5d0e 100644 --- a/include/git2/email.h +++ b/include/git2/email.h @@ -32,6 +32,9 @@ typedef enum { * patch is for a single commit (1/1). */ GIT_EMAIL_CREATE_ALWAYS_NUMBER = (1u << 1), + + /** Do not perform rename or similarity detection. */ + GIT_EMAIL_CREATE_NO_RENAMES = (1u << 2), } git_email_create_flags_t; /** @@ -46,6 +49,9 @@ typedef struct { /** Options to use when creating diffs */ git_diff_options diff_opts; + /** Options for finding similarities within diffs */ + git_diff_find_options diff_find_opts; + /** * The subject prefix, by default "PATCH". If set to an empty * string ("") then only the patch numbers will be shown in the @@ -65,14 +71,16 @@ typedef struct { } git_email_create_options; /* - * By default, our options include binary diffs to match `git format-patch`. + * By default, our options include rename detection and 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_VERSION, GIT_DIFF_SHOW_BINARY, GIT_SUBMODULE_IGNORE_UNSPECIFIED, {NULL,0}, NULL, NULL, NULL, 3 } \ + { GIT_DIFF_OPTIONS_VERSION, GIT_DIFF_SHOW_BINARY, GIT_SUBMODULE_IGNORE_UNSPECIFIED, {NULL,0}, NULL, NULL, NULL, 3 }, \ + GIT_DIFF_FIND_OPTIONS_INIT \ } /** |
