diff options
author | Russell Belfer <rb@github.com> | 2013-05-20 13:37:21 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-05-20 13:37:21 -0700 |
commit | 9be5be47fb1d9bc08e25b30c05dbf48739710062 (patch) | |
tree | 7543170535a1260f24c27696c361e58ae19de17c /src/fileops.h | |
parent | 5c8f37a397609eba92c6a906be467a7d7373e4f3 (diff) | |
download | libgit2-9be5be47fb1d9bc08e25b30c05dbf48739710062.tar.gz |
More git_diff_find_similar improvements
- Add new GIT_DIFF_FIND_EXACT_MATCH_ONLY flag to do similarity
matching without using the similarity metric (i.e. only compare
the SHA).
- Clean up the similarity measurement code to more rigorously
distinguish between files that are not similar and files that
are not comparable (previously, a 0 could either mean that the
files could not be compared or that they were totally different)
- When splitting a MODIFIED file into a DELETE/ADD pair, actually
make a DELETED/UNTRACKED pair if the right side of the diff is
from the working directory. This prevents an odd mix of ADDED
and UNTRACKED files on workdir diffs.
Diffstat (limited to 'src/fileops.h')
-rw-r--r-- | src/fileops.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/fileops.h b/src/fileops.h index 627a6923d..3e214aab1 100644 --- a/src/fileops.h +++ b/src/fileops.h @@ -223,6 +223,7 @@ extern git_off_t git_futils_filesize(git_file fd); #define GIT_MODE_PERMS_MASK 0777 #define GIT_CANONICAL_PERMS(MODE) (((MODE) & 0100) ? 0755 : 0644) #define GIT_MODE_TYPE(MODE) ((MODE) & ~GIT_MODE_PERMS_MASK) +#define GIT_MODE_ISBLOB(MODE) (GIT_MODE_TYPE(MODE) == GIT_MODE_TYPE(GIT_FILEMODE_BLOB)) /** * Convert a mode_t from the OS to a legal git mode_t value. |