diff options
| author | Ben Straub <bs@github.com> | 2013-12-06 13:38:59 -0800 |
|---|---|---|
| committer | Ben Straub <bs@github.com> | 2013-12-06 13:38:59 -0800 |
| commit | 7fb4147f1f7e64d7544e574998d5cec04077dfc4 (patch) | |
| tree | 2d8dc79a8dcf60c9cfc56f11e675d03c6aeb34e7 /src/diff_tform.c | |
| parent | 710f383868cef86ff837340c698b1672c7902486 (diff) | |
| download | libgit2-7fb4147f1f7e64d7544e574998d5cec04077dfc4.tar.gz | |
Don't clobber whitespace settings
Diffstat (limited to 'src/diff_tform.c')
| -rw-r--r-- | src/diff_tform.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/diff_tform.c b/src/diff_tform.c index 0c9f961f..3ff6108c 100644 --- a/src/diff_tform.c +++ b/src/diff_tform.c @@ -294,12 +294,12 @@ static int normalize_find_opts( giterr_clear(); else if (val) { int boolval; - if (!git__parse_bool(&boolval, val) && !boolval) - opts->flags = 0; - else if (!strcasecmp(val, "copies") || !strcasecmp(val, "copy")) - opts->flags = GIT_DIFF_FIND_RENAMES | GIT_DIFF_FIND_COPIES; + if (!git__parse_bool(&boolval, val) && !boolval) { + /* do nothing */ + } else if (!strcasecmp(val, "copies") || !strcasecmp(val, "copy")) + opts->flags |= (GIT_DIFF_FIND_RENAMES | GIT_DIFF_FIND_COPIES); else - opts->flags = GIT_DIFF_FIND_RENAMES; + opts->flags |= GIT_DIFF_FIND_RENAMES; } } GITERR_CHECK_VERSION(given, GIT_DIFF_FIND_OPTIONS_VERSION, "git_diff_find_options"); |
