diff options
author | Russell Belfer <rb@github.com> | 2013-05-10 09:32:42 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-05-10 09:32:42 -0700 |
commit | e9ba61f399594b16b8168f87264b7794eebc6b3a (patch) | |
tree | a85bfda07988218da5a50fffee721119d92e2f5c /src/diff_output.c | |
parent | ae59321fb86d080d0fd17e8c9a57c855914bcd32 (diff) | |
download | libgit2-e9ba61f399594b16b8168f87264b7794eebc6b3a.tar.gz |
Fix diff output for renames and copies
If you use rename detection, the renamed and copied files would
not show any text diffs because the function that decides if
data should be loaded didn't know which sides of the diff to
load for those cases.
This adds a test that looks at the patch generated for diff
entries that are COPIED or RENAMED.
Diffstat (limited to 'src/diff_output.c')
-rw-r--r-- | src/diff_output.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/diff_output.c b/src/diff_output.c index 2214ae1b5..07fcf47a7 100644 --- a/src/diff_output.c +++ b/src/diff_output.c @@ -593,6 +593,8 @@ static int diff_patch_load( delta->new_file.flags |= GIT_DIFF_FLAG__NO_DATA; break; case GIT_DELTA_MODIFIED: + case GIT_DELTA_COPIED: + case GIT_DELTA_RENAMED: break; case GIT_DELTA_UNTRACKED: delta->old_file.flags |= GIT_DIFF_FLAG__NO_DATA; |