summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVicent Marti <vicent@github.com>2014-01-22 10:34:25 -0800
committerVicent Marti <vicent@github.com>2014-01-22 10:34:25 -0800
commit2b678ce5b4ebbc1d045f2a07651720d8c1e6458c (patch)
tree53a1d3d414bc798e9a8b40e081be93fb8036a99b /src
parentec088fec9dc65621275b9f16d746820af67592de (diff)
parente8b81c698c52a7197c0842b6503e8b980d773c74 (diff)
downloadlibgit2-2b678ce5b4ebbc1d045f2a07651720d8c1e6458c.tar.gz
Merge pull request #2070 from ethomson/checkout_filemode
Preserve tree filemode in index during checkout
Diffstat (limited to 'src')
-rw-r--r--src/checkout.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/checkout.c b/src/checkout.c
index cfb0e72ab..962929075 100644
--- a/src/checkout.c
+++ b/src/checkout.c
@@ -1217,8 +1217,7 @@ static int checkout_update_index(
memset(&entry, 0, sizeof(entry));
entry.path = (char *)file->path; /* cast to prevent warning */
- git_index_entry__init_from_stat(
- &entry, st, !(git_index_caps(data->index) & GIT_INDEXCAP_NO_FILEMODE));
+ git_index_entry__init_from_stat(&entry, st, true);
git_oid_cpy(&entry.oid, &file->oid);
return git_index_add(data->index, &entry);