|
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
|
|
d4cff0cb
|
2013-08-13T09:40:32
|
|
Rename git__win32_path fns to git_win32_path
|
|
e12618b1
|
2013-08-13T09:22:53
|
|
Add some things to precompiled header
|
|
3869a171
|
2013-08-08T10:10:23
|
|
Fix mingw cross-compile build
|
|
3948e862
|
2013-08-13T09:38:37
|
|
windows: Fuck me
|
|
345b6307
|
2013-08-13T09:35:07
|
|
windows: Require order
|
|
53d712dc
|
2013-08-13T09:31:03
|
|
windows: Missing renames.
|
|
abf37327
|
2013-08-13T09:15:39
|
|
windows: Path conversion with better semantics
|
|
0e26fca1
|
2013-08-10T15:11:19
|
|
Make utf-8 source strings unlimited
|
|
aa0af729
|
2013-08-10T14:56:58
|
|
Fix 64-bit MSVC warnings
|
|
57f31f05
|
2013-08-08T11:05:00
|
|
Fixes to safely reading the index
Avoid wrapping around extension size when reading, avoid walking off
the end of the buffer when reading names.
|
|
aaefbdee
|
2013-08-08T08:48:57
|
|
Discriminate path-specific and general UTF-X conversions
|
|
2c0128ee
|
2013-08-07T19:29:33
|
|
Rename git_win_str_utf* to git_win32_path_utf*
|
|
9c38f7a6
|
2013-08-07T13:22:41
|
|
Add typedefs for win32 utf-8 and utf-16 buffers
...and normalize the signatures of the two conversion functions.
|
|
d8563619
|
2013-08-05T11:41:39
|
|
Split UTF-16 and UTF-8 buffer sizes for win32
Also fixed up call-sites to use the correct buffer sizes, especially
when converting to utf-8.
|
|
c4ac556e
|
2013-06-29T12:48:58
|
|
Fix compilation warnings
|
|
47537112
|
2013-06-25T16:46:06
|
|
Correctly handle junctions
A junction has S_IFDIR | S_IFLNK set, however, only one makes sense.
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|
|
a7ea4095
|
2013-06-23T01:25:34
|
|
Do not redefine WC_ERR_INVALID_CHARS
WC_ERR_INVALID_CHARS might be already defined by the Windows SDK.
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|
|
c1cf1af4
|
2013-06-12T21:15:58
|
|
cmake: Add option to specify the name of the binary
|
|
37f66e82
|
2013-06-12T15:21:21
|
|
Fix Windows warnings
This fixes problems with missing function prototypes and 64-bit
data issues on Windows.
|
|
5a6e45cc
|
2013-06-12T21:14:04
|
|
Revert "cmake: Update Windows resources to reflect the optional vendor string"
This reverts commit 095bfd748766966f5515bdfe64867d6a09287123.
|
|
d17db2fd
|
2013-05-30T11:30:34
|
|
thread: fix segfault on Windows 64 bits
`lpExitCode` is a pointer to a long. A long is 32 bits wide on Windows.
It means that on Windows 64bits, `GetExitCodeThread()` doesn't set/clear the high-order bytes of the 64 bits memory space pointed at by `value_ptr`.
|
|
095bfd74
|
2013-05-21T11:38:24
|
|
cmake: Update Windows resources to reflect the optional vendor string
Make InternalName and OriginalFilename resources reflect the name of the compiled binary.
|
|
7026ad89
|
2013-05-16T21:08:55
|
|
calloc() to initialize memory
|
|
1fed6b07
|
2013-05-13T21:57:37
|
|
Fix trailing whitespaces
|
|
0cb16fe9
|
2013-05-15T20:26:55
|
|
Unify whitespaces to tabs
|
|
3405f787
|
2013-05-06T06:51:21
|
|
Merge pull request #1547 from ethomson/win32_stat
p_stat() should follow symlinks on windows
|
|
00a4c479
|
2013-05-04T12:04:39
|
|
p_stat() should follow symlinks on windows
|
|
e09d18ee
|
2013-05-03T18:39:44
|
|
allow checkout to proceed when a dir to be removed is in use (win32)
|
|
38eef611
|
2013-04-16T14:19:27
|
|
Make indexer use shared packfile open code
The indexer was creating a packfile object separately from the
code in pack.c which was a problem since I put a call to
git_mutex_init into just pack.c. This commit updates the pack
function for creating a new pack object (i.e. git_packfile_check())
so that it can be used in both places and then makes indexer.c
use the shared initialization routine.
There are also a few minor formatting and warning message fixes.
|
|
c6289186
|
2013-04-15T16:31:04
|
|
Fixes for Windows cas/threading stuff
|
|
b39f9697
|
2013-03-31T23:04:14
|
|
Fix whitespace in src/win32/version.h
|