diff options
author | Alan Rogers <alan@github.com> | 2014-06-04 11:53:44 -0700 |
---|---|---|
committer | Alan Rogers <alan@github.com> | 2014-06-04 11:53:44 -0700 |
commit | 5e6542003e32ce59a8a586f00a7104aaef21fb00 (patch) | |
tree | 48ba621169be189a1d6be98538e230af12c20f26 /src/diff.c | |
parent | 7b491a7deac7a97f440fb6d29f2f84d5ef797a42 (diff) | |
download | libgit2-5e6542003e32ce59a8a586f00a7104aaef21fb00.tar.gz |
Implement GIT_DIFF_INCLUDE_UNREADABLE_AS_UNTRACKED
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 00e6fef8f..b55d123c1 100644 --- a/src/diff.c +++ b/src/diff.c @@ -995,7 +995,10 @@ static int handle_unmatched_new_item( } else if (nitem->mode == GIT_FILEMODE_UNREADABLE) { - delta_type = GIT_DELTA_UNREADABLE; + if (DIFF_FLAG_IS_SET(diff, GIT_DIFF_INCLUDE_UNREADABLE_AS_UNTRACKED)) + delta_type = GIT_DELTA_UNTRACKED; + else + delta_type = GIT_DELTA_UNREADABLE; } /* Actually create the record for this item if necessary */ |