| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
win32: ensure hidden files can be staged
|
| | |
|
|/
|
|
|
|
|
| |
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
|
|\
| |
| | |
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).
|
| | |
|
|/ |
|
|
|
|
|
|
| |
Provide functionality to set the time on a filesystem entry,
using utimes or futimes on POSIX type systems or SetFileTime
on 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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
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).
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
these shouldn't be necessary if _WIN32_WINNT >= _WIN32_WINNT_VISTA
|
|
|
|
| |
should cut down on compiler warnings with mingw
|
|\
| |
| | |
Fix crash in git_clone on extremely large repos
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
allocations: test for overflow of requested size
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.)
|
| |
| |
| |
| |
| | |
Introduce some helper macros to test integer overflow from arithmetic
and set error message appropriately.
|
|/
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
| |
`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:/`.
|
| |
|
|
|
|
|
| |
We need to know what wchar_t and MAX_PATH are. Including common.h takes
care of that for us.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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:\)
|
|\ |
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
* 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)
|
| | |
|
| | |
|
| | |
|