- 26 Jul, 2017 2 commits
-
-
When using the `do_with_retries` macro for retrying filesystem operations in the posix emulation layer, allow the remediation function to return `GIT_RETRY`, meaning that the error was believed to be remediated, and the operation should be retried immediately, without a sleep. This is a slightly more general solution to the problem fixed in #4312.
Edward Thomson committed -
Fixed an issue where the retry logic on p_unlink sleeps before it tries setting a file to write mode causing unnecessary slowdown.
Carson Howard committed
-
- 03 Jul, 2017 1 commit
-
-
Next to including several files, our "common.h" header also declares various macros which are then used throughout the project. As such, we have to make sure to always include this file first in all implementation files. Otherwise, we might encounter problems or even silent behavioural differences due to macros or defines not being defined as they should be. So in fact, our header and implementation files should make sure to always include "common.h" first. This commit does so by establishing a common include pattern. Header files inside of "src" will now always include "common.h" as its first other file, separated by a newline from all the other includes to make it stand out as special. There are two cases for the implementation files. If they do have a matching header file, they will always include this one first, leading to "common.h" being transitively included as first file. If they do not have a matching header file, they instead include "common.h" as first file themselves. This fixes the outlined problems and will become our standard practice for header and source files inside of the "src/" from now on.
Patrick Steinhardt committed
-
- 17 Apr, 2017 1 commit
-
-
The `remediation` function is run in the retry loop in order to attempt to fix any problems that the prior run encountered. There is nothing "cleaned up". Clarify the name.
Edward Thomson committed
-
- 05 Apr, 2017 1 commit
-
-
Instead of failing to set the timestamp of a read-only file (like any object file), set it writable temporarily to update the timestamp.
Edward Thomson committed
-
- 03 Apr, 2017 3 commits
-
-
POSIX emulation retries should be configurable so that tests can disable them. In particular, maniacally threading tests may end up trying to open locked files and need retries, which will slow continuous integration tests significantly.
Edward Thomson committed -
Edward Thomson committed
-
This can prevent FILE_SHARED_VIOLATIONS when used in tools such as TortoiseGit TGitCache and FILE_SHARE_DELETE, because files can be opened w/o being locked any more. Signed-off-by: Sven Strickroth <email@cs-ware.de>
Sven Strickroth committed
-
- 02 Apr, 2017 5 commits
-
-
Signed-off-by: Sven Strickroth <email@cs-ware.de>
Sven Strickroth committed -
Signed-off-by: Sven Strickroth <email@cs-ware.de>
Sven Strickroth committed -
Edward Thomson committed
-
Edward Thomson committed
-
Edward Thomson committed
-
- 01 Apr, 2017 2 commits
-
-
Provide a macro that will allow us to run a function with posix-like return values multiple times in a retry loop, with an optional cleanup function called between invocations.
Edward Thomson committed -
Introduce mapping from windows error codes to errno values. This allows us to replace our calls to the Windows posix emulation functions with calls to the Win32 APIs for more fine-grained control over the emulation. These mappings match the Windows CRT's mappings for its posix emulation as they were described to me.
Edward Thomson committed
-
- 28 Feb, 2017 1 commit
-
-
Introduce a simple counter that `p_fsync` implements. This is useful for ensuring that `p_fsync` is called when we expect it to be, for example when we have enabled an odb backend to perform `fsync`s when writing objects.
Edward Thomson committed
-
- 18 May, 2016 1 commit
-
-
Tyler Church committed
-
- 16 Feb, 2016 1 commit
-
-
Edward Thomson committed
-
- 12 Feb, 2016 1 commit
-
-
Windows defines `timeval` with `long`, which we cannot sanely cope with. Instead, use a custom timeval struct.
Edward Thomson committed
-
- 17 Sep, 2015 1 commit
-
-
Don't coalesce all errors into ENOENT. At least identify EACCES. All callers should be handling this case already, as the POSIX `lstat` will return this.
Edward Thomson committed
-
- 02 Jul, 2015 1 commit
-
-
Introduce `git__getenv` which is a UTF-8 aware `getenv` everywhere. Make `cl_getenv` use this to keep consistent memory handling around return values (free everywhere, as opposed to only some platforms).
Edward Thomson committed
-
- 16 Jun, 2015 1 commit
-
-
Provide functionality to set the time on a filesystem entry, using utimes or futimes on POSIX type systems or SetFileTime on Win32.
Edward Thomson committed
-
- 28 Apr, 2015 2 commits
-
-
Edward Thomson committed
-
Changed win32/path_w32.c to utilize NTFS' FindFirst..FindNext data instead of doing an lstat per file. Avoiding unnecessary directory opens and file scans reduces IO, improving overall performance. Effect is magnified due to NTFS being a kernel mode file system (as opposed to user mode).
J Wyman committed
-
- 06 Mar, 2015 1 commit
-
-
Matti Virolainen committed
-
- 03 Mar, 2015 2 commits
-
-
Jeff Hostetler committed
-
Jeff Hostetler committed
-
- 13 Feb, 2015 1 commit
-
-
Win32 generally ignores Unix-like mode bits that don't make any sense on the platform (eg `0644` makes no sense to Windows). But WINE complains loudly when presented with POSIXy bits. Remove them. (Thanks @phkelley)
Edward Thomson committed
-
- 05 Feb, 2015 1 commit
-
-
`p_stat` calls `git_win32_path_from_utf8`, which canonicalizes the path. Do not further try to modify the path, else we trim the trailing slash from a root directory and try to access `C:` instead of `C:/`.
Edward Thomson committed
-
- 16 Dec, 2014 1 commit
-
-
When turning UTF-8 paths into UCS-2 paths for Windows, always use the \\?\-prefixed paths. Because this bypasses the system's path canonicalization, handle the canonicalization functions ourselves. We must: 1. always use a backslash as a directory separator 2. only use a single backslash between directories 3. not rely on the system to translate "." and ".." in paths 4. remove trailing backslashes, except at the drive root (C:\)
Edward Thomson committed
-
- 13 Oct, 2014 1 commit
-
-
A reparse point that is an IO_REPARSE_TAG_MOUNT_POINT could be a junction or an actual filesystem mount point. (Who knew?) If it's the latter, its reparse point will report the actual volume information \??\Volume{GUID}\ and we should not attempt to dereference that further, instead readlink should report EINVAL since it's not a symlink / junction and its original path was canonical. Yes, really.
Edward Thomson committed
-
- 05 Aug, 2014 2 commits
-
-
Jacques Germishuys committed
-
* Removes mingw-compat.h * Cleans up separation of compiler/platform idiosyncrasies * Unifies mingw/msvc stat structures and functions * (Tries to) hide more compiler specific implementation details (even in our internal API)
Jacques Germishuys committed
-
- 06 Jul, 2014 2 commits
-
-
Jacques Germishuys committed
-
Jacques Germishuys committed
-
- 04 Jun, 2014 1 commit
-
-
When renaming a lock file to its final location, we need to make sure that it is replaced atomically. We currently have a workaround for Windows by removing the target file. This means that the target file, which may be a ref or a packfile, may cease to exist for a short wile, which shold be avoided. Implement the workaround only in Windows, by making sure that the file we want to replace is writable.
Carlos Martín Nieto committed
-
- 16 May, 2014 2 commits
-
-
Windows has its own ftruncate() called _chsize_s(). p_mkstemp() is changed to use p_open() so we can make sure we open for writing; the addition of exclusive create is a good thing to do regardless, as we want a temporary path for ourselves. Lastly, MSVC doesn't quite know how to add two numbers if one of them is a void pointer, so let's alias it to unsigned char.C
Carlos Martín Nieto committed -
Philip Kelley committed
-
- 23 Apr, 2014 1 commit
-
-
Philip Kelley committed
-
- 22 Apr, 2014 1 commit
-
-
Edward Thomson committed
-