Skip to content

Commit 6ca8b44

Browse files
author
Stephan Dilly
authored
add missing diff option (rust-lang#753)
1 parent 353450e commit 6ca8b44

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

libgit2-sys/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,6 +1172,7 @@ pub const GIT_DIFF_UPDATE_INDEX: git_diff_option_t = 1 << 15;
11721172
pub const GIT_DIFF_INCLUDE_UNREADABLE: git_diff_option_t = 1 << 16;
11731173
pub const GIT_DIFF_INCLUDE_UNREADABLE_AS_UNTRACKED: git_diff_option_t = 1 << 17;
11741174
pub const GIT_DIFF_INDENT_HEURISTIC: git_diff_option_t = 1 << 18;
1175+
pub const GIT_DIFF_IGNORE_BLANK_LINES: git_diff_option_t = 1 << 19;
11751176
pub const GIT_DIFF_FORCE_TEXT: git_diff_option_t = 1 << 20;
11761177
pub const GIT_DIFF_FORCE_BINARY: git_diff_option_t = 1 << 21;
11771178
pub const GIT_DIFF_IGNORE_WHITESPACE: git_diff_option_t = 1 << 22;

src/diff.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -814,6 +814,11 @@ impl DiffOptions {
814814
self.flag(raw::GIT_DIFF_IGNORE_WHITESPACE_EOL, ignore)
815815
}
816816

817+
/// Ignore blank lines
818+
pub fn ignore_blank_lines(&mut self, ignore: bool) -> &mut DiffOptions {
819+
self.flag(raw::GIT_DIFF_IGNORE_BLANK_LINES, ignore)
820+
}
821+
817822
/// When generating patch text, include the content of untracked files.
818823
///
819824
/// This automatically turns on `include_untracked` but it does not turn on

0 commit comments

Comments
 (0)