diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2015-06-19 08:32:26 -0700 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2015-06-20 15:37:32 -0400 |
| commit | 96dd171e34fbb89d5ff5eb320c00db82b9ed3942 (patch) | |
| tree | 12a051e50a7ceb8a5f1f0de948a46890028432ed /src/checkout.c | |
| parent | fc6568021c301ff4ebefe22814498ba07fe60b9c (diff) | |
| download | libgit2-96dd171e34fbb89d5ff5eb320c00db82b9ed3942.tar.gz | |
diff: preserve original mode in the index
When updating the index during a diff, preserve the original mode,
which prevents us from dropping the mode to what we have interpreted
as on our system (eg, what the working directory claims it to be,
which may be a lie on some systems.)
Diffstat (limited to 'src/checkout.c')
| -rw-r--r-- | src/checkout.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/checkout.c b/src/checkout.c index fd2b19a95..2893c63de 100644 --- a/src/checkout.c +++ b/src/checkout.c @@ -211,7 +211,7 @@ static bool checkout_is_workdir_modified( if (baseitem->size && wditem->file_size != baseitem->size) return true; - if (git_diff__oid_for_entry(&oid, data->diff, wditem, NULL) < 0) + if (git_diff__oid_for_entry(&oid, data->diff, wditem, wditem->mode, NULL) < 0) return false; /* Allow the checkout if the workdir is not modified *or* if the checkout |
