diff options
Diffstat (limited to 'src/diff.c')
-rw-r--r-- | src/diff.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/diff.c b/src/diff.c index 0861b13eb..ca08f4233 100644 --- a/src/diff.c +++ b/src/diff.c @@ -291,8 +291,11 @@ static git_diff_list *git_diff_list_alloc( * - diff.noprefix */ - if (opts == NULL) + if (opts == NULL) { + /* Make sure we default to 3 lines */ + diff->opts.context_lines = 3; return diff; + } memcpy(&diff->opts, opts, sizeof(git_diff_options)); |