|
b85d0afd
|
2016-02-18T15:11:02
|
|
Merge pull request #3606 from ethomson/drop_xp
win32: drop xp support in WideCharToMultiByte
|
|
c4d23928
|
2016-02-11T15:41:07
|
|
fstat: use our custom `stat`
|
|
35439f59
|
2016-02-11T12:24:21
|
|
win32: introduce p_timeval that isn't stupid
Windows defines `timeval` with `long`, which we cannot
sanely cope with. Instead, use a custom timeval struct.
|
|
494e61b8
|
2016-02-09T17:44:59
|
|
win32: drop xp support in WideCharToMultiByte
|
|
e78e8fae
|
2015-11-20T20:22:38
|
|
Make stat.st_size a __int64 not a uint64_t
|
|
75a0ccf5
|
2015-11-12T19:53:09
|
|
Merge pull request #3170 from CmdrMoozy/nsec_fix
git_index_entry__init_from_stat: set nsec fields in entry stats
|
|
8c7c5fa5
|
2015-10-20T17:42:42
|
|
config: add a ProgramData level
This is where portable git stores the global configuration which we can
use to adhere to it even though git isn't quite installed on the system.
|
|
c7b17fb5
|
2015-10-01T18:01:32
|
|
Merge branch 'master' into nsec_fix_next
|
|
92a47824
|
2015-09-22T23:10:56
|
|
win32: propogate filename too long errors
|
|
360dd4da
|
2015-06-23T10:02:48
|
|
win32: define our own POSIX struct stat, and support USE_NSEC
|
|
e164ddb1
|
2015-09-17T12:23:19
|
|
win32: return EACCES in `p_lstat`
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.
|
|
aa06ecaf
|
2015-08-28T19:30:08
|
|
Merge pull request #3352 from ethomson/hidden
win32: ensure hidden files can be staged
|
|
eba784d2
|
2015-08-05T10:19:06
|
|
Fix duplicate basenames to support older VS
With Visual Studio versions 2008 and older they ignore the full path to files and only check
the basename of the file to find a collision. Additionally, having duplicate basenames can break
other build tools like GYP.
This fixes https://github.com/libgit2/libgit2/issues/3356
|
|
bdec3363
|
2015-08-03T17:48:33
|
|
win32: ensure hidden files can be staged
|
|
ea445e06
|
2015-07-07T00:48:17
|
|
Merge pull request #3288 from ethomson/getenv
git__getenv: utf-8 aware env reader
|
|
e069c621
|
2015-07-02T09:25:48
|
|
git__getenv: utf-8 aware env reader
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).
|
|
827b954e
|
2015-06-28T06:56:02
|
|
Reserve aux_id 0; sort leaks by aux_id. Fix cmp.
|
|
93b42728
|
2015-06-09T14:38:30
|
|
Include stacktrace summary in memory leak output.
|
|
121c3171
|
2015-06-16T15:18:04
|
|
Introduce p_utimes and p_futimes
Provide functionality to set the time on a filesystem entry,
using utimes or futimes on POSIX type systems or SetFileTime
on Win32.
|
|
cd39e4e2
|
2015-04-29T18:12:51
|
|
git_buf_put_w: introduce utf16->utf8 conversion
|
|
f63a1b72
|
2015-04-29T17:23:02
|
|
git_path_diriter: use FindFirstFile in win32
Using FindFirstFile and FindNextFile in win32 allows us to
use the directory information that is returned, instead of
us having to get the file attributes all over again, which
is a distinct cost savings on win32.
|
|
35c1d207
|
2015-04-29T14:03:20
|
|
git_win32_path_dirload_with_stat: removed
|
|
544139f5
|
2015-04-28T16:39:47
|
|
win32: keep full path for realpath usage
|
|
c074d7a4
|
2015-04-28T12:24:08
|
|
win32: mimic git_path_dirload_with_stat closely
|
|
b3f6cef0
|
2015-04-28T11:16:42
|
|
dirload: loop conditional; less path mangling
|
|
e05531dd
|
2015-04-27T18:02:06
|
|
win32 dirload: don't heap allocate DIR structure
|
|
f3c444b8
|
2015-04-27T17:47:51
|
|
win32: abstract file attributes -> struct stat fn
|
|
1920ee4e
|
2015-03-26T18:10:24
|
|
Improvements to status performance on Windows.
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).
|
|
06c985d8
|
2015-04-18T09:07:48
|
|
Rename routine to free TLS data
|
|
55c5f756
|
2015-04-17T09:30:22
|
|
Attempt to fix Windows TLS memory leak.
|
|
523526e5
|
2015-03-18T18:25:14
|
|
win32 resource: allow custom comments field in DLL
|
|
78c34af0
|
2015-03-06T12:23:14
|
|
Use secure API if available.
|
|
04c5a9c0
|
2015-03-05T19:42:54
|
|
Add some missing definitions for mingw.org
these shouldn't be necessary if _WIN32_WINNT >= _WIN32_WINNT_VISTA
|
|
1a7ea63d
|
2015-03-05T17:11:17
|
|
Move definitions of strcasecmp and strncasecmp to msvc-compat.h
should cut down on compiler warnings with mingw
|
|
bdf0e734
|
2015-03-04T14:55:56
|
|
Merge pull request #2932 from jeffhostetler/jeffhostetler/big_clone_crash
Fix crash in git_clone on extremely large repos
|
|
d8be5087
|
2015-03-03T13:35:10
|
|
Change ifdef for MINGW32.
|
|
7e9b21aa
|
2015-02-27T08:54:48
|
|
Fix p_ftruncate to handle big files for git_clone
|
|
bf1476f1
|
2015-03-02T10:35:26
|
|
win32: add the patch level to the .dll fileversion
Win32 DLLs have four fields for the version number (major, minor,
teeny, patch). If a consumer wants to build a custom DLL, it may
be useful to set the patchlevel version number in the DLL.
This value only affects the DLL version number, it does not affect
the resultant "version number", which remains major.minor.teeny.
|
|
a7fa970f
|
2015-02-15T05:13:50
|
|
Merge pull request #2895 from ethomson/alloc_overflow
allocations: test for overflow of requested size
|
|
f1453c59
|
2015-02-12T12:19:37
|
|
Make our overflow check look more like gcc/clang's
Make our overflow checking look more like gcc and clang's, so that
we can substitute it out with the compiler instrinsics on platforms
that support it. This means dropping the ability to pass `NULL` as
an out parameter.
As a result, the macros also get updated to reflect this as well.
|
|
527ed59a
|
2015-02-13T09:18:49
|
|
win32: limit the mode to `_wopen`/`_waccess`
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)
|
|
2884cc42
|
2015-02-11T09:39:38
|
|
overflow checking: don't make callers set oom
Have the ALLOC_OVERFLOW testing macros also simply set_oom in the
case where a computation would overflow, so that callers don't
need to.
|
|
3603cb09
|
2015-02-10T23:13:49
|
|
git__*allocarray: safer realloc and malloc
Introduce git__reallocarray that checks the product of the number
of elements and element size for overflow before allocation. Also
introduce git__mallocarray that behaves like calloc, but without the
`c`. (It does not zero memory, for those truly worried about every
cycle.)
|
|
392702ee
|
2015-02-09T23:41:13
|
|
allocations: test for overflow of requested size
Introduce some helper macros to test integer overflow from arithmetic
and set error message appropriately.
|
|
3c68bfcd
|
2015-02-04T18:24:31
|
|
stat: don't remove trailing '/' from root on win32
`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:/`.
|
|
a1daec3c
|
2014-12-29T18:11:33
|
|
Undef stat first
|
|
629417bd
|
2014-12-19T08:08:47
|
|
Fix ming32 compilation
We need to know what wchar_t and MAX_PATH are. Including common.h takes
care of that for us.
|
|
a64119e3
|
2014-11-25T18:13:00
|
|
checkout: disallow bad paths on win32
Disallow:
1. paths with trailing dot
2. paths with trailing space
3. paths with trailing colon
4. paths that are 8.3 short names of .git folders ("GIT~1")
5. paths that are reserved path names (COM1, LPT1, etc).
6. paths with reserved DOS characters (colons, asterisks, etc)
These paths would (without \\?\ syntax) be elided to other paths - for
example, ".git." would be written as ".git". As a result, writing these
paths literally (using \\?\ syntax) makes them hard to operate with from
the shell, Windows Explorer or other tools. Disallow these.
|
|
cceae9a2
|
2014-12-01T13:09:58
|
|
win32: use NT-prefixed "\\?\" paths
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:\)
|
|
177a29d8
|
2014-10-27T10:39:45
|
|
Merge commit 'refs/pull/2366/head' of github.com:libgit2/libgit2
|
|
8d45b469
|
2014-10-11T14:34:24
|
|
p_lstat win32: don't canonicalize volume mounts
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.
|
|
07d03d31
|
2014-07-13T16:40:51
|
|
Introduce some consistency in definition/declaration ordering
|
|
c983604e
|
2014-07-12T14:44:21
|
|
Consistently use p_snprintf
|
|
2f795d8f
|
2014-07-12T14:45:56
|
|
Cleanup portability/compatibility layer
* 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)
|
|
59ceb432
|
2014-07-05T21:27:47
|
|
Define IO_REPARSE_TAG_SYMLINK if its not defined by WinNT.h
|
|
72090514
|
2014-07-05T21:27:21
|
|
Secure CRT is only available from Visual Studio 2005+
|
|
cde32d4d
|
2014-07-05T21:25:55
|
|
Variadic macros is only available from Visual Studio 2005+
|
|
ab864e9c
|
2014-07-05T21:25:20
|
|
_stat64 is a function, __stat64 is the structure
|
|
461da57a
|
2014-06-23T17:32:30
|
|
Merge remote-tracking branch 'upstream/cmn/filebuf-atomic-unlock'
|
|
1b4e29b7
|
2014-06-07T13:56:39
|
|
React to review feedback
|
|
fb591767
|
2014-06-07T12:51:48
|
|
Win32: Fix object::cache::threadmania test on x64
|
|
e58281aa
|
2014-04-04T14:40:38
|
|
filebuf: make unlocking atomic
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.
|
|
62e562f9
|
2014-05-18T07:54:41
|
|
Fix compiler warning (git_off_t cast to size_t).
Use size_t for page size, instead of long. Check result of sysconf.
Use size_t for page offset so no cast to size_t (second arg to p_mmap).
Use mod instead div/mult pair, so no cast to size_t is necessary.
|
|
138af337
|
2014-05-19T12:20:31
|
|
Merge pull request #2303 from jacquesg/mingw-lseek
WIP: Windows fixes
|
|
0731a5b4
|
2014-05-14T19:12:48
|
|
indexer: mmap fixes for Windows
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
|
|
f7310540
|
2014-05-13T02:41:48
|
|
indexer: use mmap for writing
Some OSs cannot keep their ideas about file content straight when mixing
standard IO with file mapping. As we use mmap for reading from the
packfile, let's make writing to the pack file use mmap.
|
|
f0b820dd
|
2014-05-16T12:38:56
|
|
Win32: Supply _O_NOINHERIT when calling _wopen
|
|
1017f81f
|
2014-04-27T13:44:06
|
|
Undef lseek first
|
|
7110000d
|
2014-04-22T10:21:19
|
|
React to feedback for UTF-8 <-> WCHAR and reparse work
|
|
65477db1
|
2014-04-21T23:32:31
|
|
Handle win32 reparse points properly
|
|
c2c81615
|
2014-04-19T18:05:31
|
|
Win32: UTF-8 <-> WCHAR conversion overhaul
|
|
2873a862
|
2014-03-27T12:42:44
|
|
Retry renaming files on Access Denied errors
When a file is open for reading (without shared-delete permission), and
then a different thread/process called p_rename, that would fail, even
if the file was only open for reading for a few milliseconds. This
change lets p_rename wait up to 50ms for the file to be closed by the
reader. Applies only to win32.
This is especially important for git_filebuf_commit, because writes
should not fail if the file is read simultaneously.
Fixes #2207
|
|
55d257e7
|
2014-02-05T15:03:00
|
|
Remove unused utf8 -> utf16 conversion code
|
|
7697e541
|
2013-12-11T15:02:20
|
|
Test cancel from indexer progress callback
This adds tests that try canceling an indexer operation from
within the progress callback.
After writing the tests, I wanted to run this under valgrind and
had a number of errors in that situation because mmap wasn't
working. I added a CMake option to force emulation of mmap and
consolidated the Amiga-specific code into that new place (so we
don't actually need separate Amiga code now, just have to turn on
-DNO_MMAP).
Additionally, I made the indexer code propagate error codes more
reliably than it used to.
|
|
5588f073
|
2013-12-09T10:25:36
|
|
Clean up warnings
|
|
758f2f10
|
2013-11-27T14:17:40
|
|
posix: Solaris doesn't have strnlen either
|
|
14997dc5
|
2013-10-08T12:45:43
|
|
More filemode cleanups for FAT on MacOS
This cleans up some additional issues. The main change is that
on a filesystem that doesn't support mode bits, libgit2 will now
create new blobs with GIT_FILEMODE_BLOB always instead of being
at the mercy to the filesystem driver to report executable or not.
This means that if "core.filemode" lies and claims that filemode
is not supported, then we will ignore the executable bit from the
filesystem. Previously we would have allowed it.
This adds an option to the new git_repository_reset_filesystem to
recurse through submodules if desired. There may be other types
of APIs that would like a "recurse submodules" option, but this
one is particularly useful.
This also has a number of cleanups, etc., for related things
including trying to give better error messages when problems come
up from the filesystem. For example, the FAT filesystem driver on
MacOS appears to return errno EINVAL if you attempt to write a
filename with invalid UTF-8 in it. We try to capture that with a
better error message now.
|
|
3d4f1698
|
2013-09-17T10:21:22
|
|
Merge pull request #1858 from linquize/win32-template-dir
Configurable template dir for Win32
|
|
eefc32d5
|
2013-09-16T12:54:40
|
|
Bug fixes and cleanups
This contains a few bug fixes and some header and API cleanups.
The main API change is that filters should now use GIT_PASSTHROUGH
to indicate that they wish to skip processing a file instead of
GIT_ENOTFOUND.
The bug fixes include a possible out-of-range buffer access in
the ident filter, a filter ordering problem I introduced into the
custom filter tests on Windows, and a filter buf NUL termination
issue that was coming up on Linux.
|
|
a3aa5f4d
|
2013-09-11T12:45:20
|
|
Add simple global shutdown hooks
Increasingly there are a number of components that want to do some
cleanup at global shutdown time (at least if there are not going
to be memory leaks). This creates a very simple system of shutdown
hooks that will be invoked by git_threads_shutdown. Right now, the
maximum number of hooks is hardcoded, but since adding a hook is
not a public API, it should be fine and I thought it was better to
start off with really simple code.
|
|
f84bc388
|
2013-09-17T23:24:44
|
|
Refactor git_win32__find_system_dirs() to extract "etc\\" as subpath parameter
|
|
89095fbd
|
2013-09-17T22:57:30
|
|
Fix failure in win32_find_git_in_registry() when UAC is turned on
Demand read only access to registry key instead of full access.
This might happen in Windows Vista and later.
|
|
ffbd337a
|
2013-09-17T22:57:06
|
|
Fix failure in win32_find_git_in_registry()
The buffer size 0 was definitely not enough so it failed
|
|
21753d48
|
2013-09-05T20:42:47
|
|
Fix warning in src/win32/version.h
|
|
dbecec37
|
2013-08-28T09:38:14
|
|
Merge pull request #1805 from libgit2/threading-packed-load
Thread safety for the refdb_fs
|
|
1ff3a094
|
2013-08-27T19:41:44
|
|
Improve win32 version check, no ipv6 tests on XP
|
|
f087bc24
|
2013-08-27T12:08:55
|
|
Convert to our own SRWLOCK type on Win32
|
|
2f368a66
|
2013-08-26T15:17:35
|
|
Fix MINGW SRWLock typedefs
|
|
43095341
|
2013-08-26T14:56:31
|
|
Load SRWLock APIs at runtime
This loads SRWLock APIs at runtime and in their absence (i.e. on
Windows before Vista) falls back on a regular CRITICAL_SECTION
that will not permit concurrent readers.
|
|
b6ac07b5
|
2013-08-22T14:45:10
|
|
Trying to fix Win32 warnings
|
|
972bb689
|
2013-08-22T14:10:56
|
|
Add SRWLock implementation of rwlocks for Win32
|
|
8255b497
|
2013-08-19T17:49:12
|
|
Quiet down some warnings
|
|
238b7614
|
2013-08-16T13:31:24
|
|
Fix p_inet_pton on windows
p_inet_pton on Windows should set errno properly for callers.
Rewrite p_inet_pton to handle error cases correctly and add
test cases to exercise this function.
|
|
86967cc5
|
2013-08-19T16:44:17
|
|
Use time(2) to get the time
We didn't use the added precision in gettimeofday, so remove it.
This prevents us from having an unnecessary reimplementation on
win32.
|
|
c9340df0
|
2013-08-16T19:40:58
|
|
Give credit to PHP for the p_readlink function in posix_w32.c
|
|
2af9bcb2
|
2013-08-13T11:37:31
|
|
Merge pull request #1779 from ben/win32-precompiled-header-speedup
Speed up build under MSVC
|
|
40948998
|
2013-08-13T11:36:24
|
|
Merge pull request #1767 from libgit2/win32-bigger-utf8-buffer
Bigger buffer for utf-8 parsing in win32
|
|
0228a514
|
2013-08-13T10:20:25
|
|
Missed one path for path_as_utf8 type
|
|
ee065601
|
2013-08-13T09:53:56
|
|
Minor win32 fixes and improvements
This is just a bunch of small fixes that I noticed while looking
at the UTF8 and UTF16 path stuff. It fixes a slowdown in looking
for an empty directory (not exiting loop asap), makes the dir name
in the git__DIR structure be a GIT_FLEX_ARRAY to save an allocation,
and fixes some slightly odd assumptions in the cl_getenv helper.
|
|
841034a3
|
2013-08-13T09:45:56
|
|
Reintroduce type for UTF8 win32 path conversions
|