diff options
| -rw-r--r-- | .gitattributes | 3 | ||||
| -rw-r--r-- | deps/winhttp/winhttp.def | 58 | ||||
| -rw-r--r-- | src/diff_tform.c | 8 | ||||
| -rw-r--r-- | src/indexer.c | 7 |
4 files changed, 38 insertions, 38 deletions
diff --git a/.gitattributes b/.gitattributes index f90540b55..176a458f9 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1 @@ -*.c eol=lf -*.h eol=lf +* text=auto diff --git a/deps/winhttp/winhttp.def b/deps/winhttp/winhttp.def index 1b2d3f0eb..eecce59c3 100644 --- a/deps/winhttp/winhttp.def +++ b/deps/winhttp/winhttp.def @@ -1,29 +1,29 @@ -LIBRARY WINHTTP
-EXPORTS
-WinHttpAddRequestHeaders@16
-WinHttpCheckPlatform@0
-WinHttpCloseHandle@4
-WinHttpConnect@16
-WinHttpCrackUrl@16
-WinHttpCreateUrl@16
-WinHttpDetectAutoProxyConfigUrl@8
-WinHttpGetDefaultProxyConfiguration@4
-WinHttpGetIEProxyConfigForCurrentUser@4
-WinHttpGetProxyForUrl@16
-WinHttpOpen@20
-WinHttpOpenRequest@28
-WinHttpQueryAuthSchemes@16
-WinHttpQueryDataAvailable@8
-WinHttpQueryHeaders@24
-WinHttpQueryOption@16
-WinHttpReadData@16
-WinHttpReceiveResponse@8
-WinHttpSendRequest@28
-WinHttpSetCredentials@24
-WinHttpSetDefaultProxyConfiguration@4
-WinHttpSetOption@16
-WinHttpSetStatusCallback@16
-WinHttpSetTimeouts@20
-WinHttpTimeFromSystemTime@8
-WinHttpTimeToSystemTime@8
-WinHttpWriteData@16
+LIBRARY WINHTTP +EXPORTS +WinHttpAddRequestHeaders@16 +WinHttpCheckPlatform@0 +WinHttpCloseHandle@4 +WinHttpConnect@16 +WinHttpCrackUrl@16 +WinHttpCreateUrl@16 +WinHttpDetectAutoProxyConfigUrl@8 +WinHttpGetDefaultProxyConfiguration@4 +WinHttpGetIEProxyConfigForCurrentUser@4 +WinHttpGetProxyForUrl@16 +WinHttpOpen@20 +WinHttpOpenRequest@28 +WinHttpQueryAuthSchemes@16 +WinHttpQueryDataAvailable@8 +WinHttpQueryHeaders@24 +WinHttpQueryOption@16 +WinHttpReadData@16 +WinHttpReceiveResponse@8 +WinHttpSendRequest@28 +WinHttpSetCredentials@24 +WinHttpSetDefaultProxyConfiguration@4 +WinHttpSetOption@16 +WinHttpSetStatusCallback@16 +WinHttpSetTimeouts@20 +WinHttpTimeFromSystemTime@8 +WinHttpTimeToSystemTime@8 +WinHttpWriteData@16 diff --git a/src/diff_tform.c b/src/diff_tform.c index 7d8463573..03dd9c9f7 100644 --- a/src/diff_tform.c +++ b/src/diff_tform.c @@ -676,11 +676,13 @@ static bool is_rename_target( return false; /* only consider ADDED, RENAMED, COPIED, and split MODIFIED as - * targets; maybe include UNTRACKED and IGNORED if requested. + * targets; maybe include UNTRACKED if requested. */ switch (delta->status) { case GIT_DELTA_UNMODIFIED: case GIT_DELTA_DELETED: + case GIT_DELTA_IGNORED: + case GIT_DELTA_CONFLICTED: return false; case GIT_DELTA_MODIFIED: @@ -707,9 +709,6 @@ static bool is_rename_target( return false; break; - case GIT_DELTA_IGNORED: - return false; - default: /* all other status values should be checked */ break; } @@ -735,6 +734,7 @@ static bool is_rename_source( case GIT_DELTA_UNTRACKED: case GIT_DELTA_UNREADABLE: case GIT_DELTA_IGNORED: + case GIT_DELTA_CONFLICTED: return false; case GIT_DELTA_DELETED: diff --git a/src/indexer.c b/src/indexer.c index ef2ac3cba..512addf48 100644 --- a/src/indexer.c +++ b/src/indexer.c @@ -478,13 +478,14 @@ static int write_at(git_indexer *idx, const void *data, git_off_t offset, size_t static int append_to_pack(git_indexer *idx, const void *data, size_t size) { git_off_t current_size = idx->pack->mwf.size; + int fd = idx->pack->mwf.fd; if (!size) return 0; - /* add the extra space we need at the end */ - if (p_ftruncate(idx->pack->mwf.fd, current_size + size) < 0) { - giterr_set(GITERR_OS, "Failed to increase size of pack file '%s'", idx->pack->pack_name); + if (p_lseek(fd, current_size + size - 1, SEEK_SET) < 0 || + p_write(idx->pack->mwf.fd, data, 1) < 0) { + giterr_set(GITERR_OS, "cannot extend packfile '%s'", idx->pack->pack_name); return -1; } |
