summaryrefslogtreecommitdiff
path: root/src/win32
Commit message (Collapse)AuthorAgeFilesLines
* config: add a ProgramData levelcmn/programdata-configCarlos Martín Nieto2015-10-212-0/+11
| | | | | 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.
* win32: propogate filename too long errorsEdward Thomson2015-09-221-8/+15
|
* win32: return EACCES in `p_lstat`Edward Thomson2015-09-171-2/+9
| | | | | | 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.
* Merge pull request #3352 from ethomson/hiddenEdward Thomson2015-08-282-8/+42
|\ | | | | win32: ensure hidden files can be staged
| * win32: ensure hidden files can be stagedEdward Thomson2015-08-032-8/+42
| |
* | Fix duplicate basenames to support older VSJohn Haley2015-08-052-2/+1
|/ | | | | | | 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
* Merge pull request #3288 from ethomson/getenvCarlos Martín Nieto2015-07-071-0/+2
|\ | | | | git__getenv: utf-8 aware env reader
| * git__getenv: utf-8 aware env readerEdward Thomson2015-07-021-0/+2
| | | | | | | | | | | | 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).
* | Reserve aux_id 0; sort leaks by aux_id. Fix cmp.Jeff Hostetler2015-06-292-10/+28
| |
* | Include stacktrace summary in memory leak output.Jeff Hostetler2015-06-294-0/+748
|/
* Introduce p_utimes and p_futimesEdward Thomson2015-06-163-0/+51
| | | | | | Provide functionality to set the time on a filesystem entry, using utimes or futimes on POSIX type systems or SetFileTime on Win32.
* git_buf_put_w: introduce utf16->utf8 conversionEdward Thomson2015-05-014-4/+77
|
* git_path_diriter: use FindFirstFile in win32Edward Thomson2015-05-011-5/+0
| | | | | | | 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.
* git_win32_path_dirload_with_stat: removedEdward Thomson2015-05-012-193/+0
|
* win32: keep full path for realpath usageEdward Thomson2015-04-281-8/+34
|
* win32: mimic git_path_dirload_with_stat closelyEdward Thomson2015-04-281-40/+28
|
* dirload: loop conditional; less path manglingEdward Thomson2015-04-281-59/+102
|
* win32 dirload: don't heap allocate DIR structureEdward Thomson2015-04-281-22/+18
|
* win32: abstract file attributes -> struct stat fnEdward Thomson2015-04-284-80/+81
|
* Improvements to status performance on Windows.J Wyman2015-04-284-86/+264
| | | | 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).
* Rename routine to free TLS dataJeff Hostetler2015-04-181-1/+1
|
* Attempt to fix Windows TLS memory leak.Jeff Hostetler2015-04-171-0/+2
|
* win32 resource: allow custom comments field in DLLEdward Thomson2015-03-181-2/+6
|
* Use secure API if available.Matti Virolainen2015-03-061-1/+1
|
* Add some missing definitions for mingw.orgTony Kelman2015-03-061-0/+7
| | | | these shouldn't be necessary if _WIN32_WINNT >= _WIN32_WINNT_VISTA
* Move definitions of strcasecmp and strncasecmp to msvc-compat.hTony Kelman2015-03-062-2/+3
| | | | should cut down on compiler warnings with mingw
* Merge pull request #2932 from jeffhostetler/jeffhostetler/big_clone_crashCarlos Martín Nieto2015-03-042-5/+21
|\ | | | | Fix crash in git_clone on extremely large repos
| * Change ifdef for MINGW32.Jeff Hostetler2015-03-031-4/+2
| |
| * Fix p_ftruncate to handle big files for git_cloneJeff Hostetler2015-03-032-4/+22
| |
* | win32: add the patch level to the .dll fileversionEdward Thomson2015-03-021-2/+2
|/ | | | | | | | | 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.
* Merge pull request #2895 from ethomson/alloc_overflowCarlos Martín Nieto2015-02-152-6/+6
|\ | | | | allocations: test for overflow of requested size
| * Make our overflow check look more like gcc/clang'sEdward Thomson2015-02-131-4/+4
| | | | | | | | | | | | | | | | | | 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.
| * overflow checking: don't make callers set oomEdward Thomson2015-02-121-3/+1
| | | | | | | | | | | | 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.
| * git__*allocarray: safer realloc and mallocEdward Thomson2015-02-121-2/+1
| | | | | | | | | | | | | | | | 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.)
| * allocations: test for overflow of requested sizeEdward Thomson2015-02-122-5/+8
| | | | | | | | | | Introduce some helper macros to test integer overflow from arithmetic and set error message appropriately.
* | win32: limit the mode to `_wopen`/`_waccess`Edward Thomson2015-02-131-3/+11
|/ | | | | | | | 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)
* stat: don't remove trailing '/' from root on win32Edward Thomson2015-02-051-6/+2
| | | | | | | `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:/`.
* Undef stat firstJacques Germishuys2014-12-291-0/+2
|
* Fix ming32 compilationCarlos Martín Nieto2014-12-191-0/+2
| | | | | We need to know what wchar_t and MAX_PATH are. Including common.h takes care of that for us.
* checkout: disallow bad paths on win32Edward Thomson2014-12-162-0/+51
| | | | | | | | | | | | | | | 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.
* win32: use NT-prefixed "\\?\" pathsEdward Thomson2014-12-168-87/+398
| | | | | | | | | | | | 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:\)
* Merge commit 'refs/pull/2366/head' of github.com:libgit2/libgit2Carlos Martín Nieto2014-10-271-2/+3
|\
| * Fix compiler warning (git_off_t cast to size_t).Albert Meltzer2014-05-191-2/+3
| | | | | | | | | | | | 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.
* | p_lstat win32: don't canonicalize volume mountsEdward Thomson2014-10-131-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Introduce some consistency in definition/declaration orderingJacques Germishuys2014-08-051-13/+14
| |
* | Consistently use p_snprintfJacques Germishuys2014-08-052-10/+11
| |
* | Cleanup portability/compatibility layerJacques Germishuys2014-08-054-61/+37
| | | | | | | | | | | | | | * 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)
* | Define IO_REPARSE_TAG_SYMLINK if its not defined by WinNT.hJacques Germishuys2014-07-061-0/+4
| |
* | Secure CRT is only available from Visual Studio 2005+Jacques Germishuys2014-07-062-3/+3
| |
* | Variadic macros is only available from Visual Studio 2005+Jacques Germishuys2014-07-061-1/+1
| |