summaryrefslogtreecommitdiff
path: root/src/diff.c
diff options
context:
space:
mode:
authorRussell Belfer <arrbee@arrbee.com>2012-02-03 17:05:05 -0800
committerRussell Belfer <arrbee@arrbee.com>2012-03-02 15:49:29 -0800
commit5a2f097fdc1408500cff9addf378f86046363665 (patch)
treeafbd0f48e08acf51ec2a7bf25d45a53ecc3c0d45 /src/diff.c
parent3a4375901a92efdc641c714ec9fd07b53f2f781e (diff)
downloadlibgit2-5a2f097fdc1408500cff9addf378f86046363665.tar.gz
Fix minor WIN32 incompatibility
File mode flags are not all defined on WIN32, but since git is so rigid in how it uses file modes, there is no reason not to hard code a particular value. Also, this is only used in the git_diff_print_compact helper function, so it is really really not important.
Diffstat (limited to 'src/diff.c')
-rw-r--r--src/diff.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/diff.c b/src/diff.c
index 252fdb8fa..a5b5e6198 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -445,7 +445,10 @@ static char pick_suffix(int mode)
{
if (S_ISDIR(mode))
return '/';
- else if (mode & S_IXUSR)
+ else if (mode & 0100)
+ /* modes in git are not very flexible, so if this bit is set,
+ * we must be dealwith with a 100755 type of file.
+ */
return '*';
else
return ' ';