diff options
author | Russell Belfer <rb@github.com> | 2013-05-24 10:37:40 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-05-24 10:37:40 -0700 |
commit | d20b044961352348855ee82dcc77615f605ac832 (patch) | |
tree | 1a63acfd305061ef5dc234102f48c92b76f861e5 /src/diff.c | |
parent | 16adc9fade52b49e2bc13cb52407cc0025a93c8b (diff) | |
download | libgit2-d20b044961352348855ee82dcc77615f605ac832.tar.gz |
Clarify GIT_DIFF_INCLUDE_UNTRACKED_CONTENT option
This improves the docs for GIT_DIFF_INCLUDE_UNTRACKED_CONTENT as
well as the other flags related to UNTRACKED items in diff, plus
it makes that flag now automatically turn on
GIT_DIFF_INCLUDE_UNTRACKED which seems like a reasonable dwim type
of change.
Diffstat (limited to 'src/diff.c')
-rw-r--r-- | src/diff.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/diff.c b/src/diff.c index d2389f103..b96ff4705 100644 --- a/src/diff.c +++ b/src/diff.c @@ -383,6 +383,10 @@ static int diff_list_apply_options( if (DIFF_FLAG_IS_SET(diff, GIT_DIFF_INCLUDE_TYPECHANGE_TREES)) diff->opts.flags |= GIT_DIFF_INCLUDE_TYPECHANGE; + /* flag INCLUDE_UNTRACKED_CONTENT implies INCLUDE_UNTRACKED */ + if (DIFF_FLAG_IS_SET(diff, GIT_DIFF_INCLUDE_UNTRACKED_CONTENT)) + diff->opts.flags |= GIT_DIFF_INCLUDE_UNTRACKED; + /* load config values that affect diff behavior */ if (git_repository_config__weakptr(&cfg, repo) < 0) return -1; |