summaryrefslogtreecommitdiff
path: root/include/git2/diff.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/git2/diff.h')
-rw-r--r--include/git2/diff.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/git2/diff.h b/include/git2/diff.h
index 121c9df5c..71a8b72bf 100644
--- a/include/git2/diff.h
+++ b/include/git2/diff.h
@@ -78,7 +78,7 @@ typedef enum {
GIT_DIFF_IGNORE_WHITESPACE_CHANGE = (1 << 3),
/** Ignore whitespace at end of line */
GIT_DIFF_IGNORE_WHITESPACE_EOL = (1 << 4),
- /** Exclude submodules from the diff completely */
+ /** Treat all submodules as unmodified */
GIT_DIFF_IGNORE_SUBMODULES = (1 << 5),
/** Use the "patience diff" algorithm (currently unimplemented) */
GIT_DIFF_PATIENCE = (1 << 6),
@@ -314,6 +314,8 @@ typedef int (*git_diff_notify_cb)(
* - `notify_cb` is an optional callback function, notifying the consumer of
* which files are being examined as the diff is generated
* - `notify_payload` is the payload data to pass to the `notify_cb` function
+ * - `ignore_submodules` overrides the submodule ignore setting for all
+ * submodules in the diff.
*/
typedef struct {
unsigned int version; /**< version for the struct */
@@ -326,6 +328,7 @@ typedef struct {
git_off_t max_size; /**< defaults to 512MB */
git_diff_notify_cb notify_cb;
void *notify_payload;
+ git_submodule_ignore_t ignore_submodules; /** << submodule ignore rule */
} git_diff_options;
#define GIT_DIFF_OPTIONS_VERSION 1