|
379c4646
|
2021-09-09T19:49:04
|
|
Fix coding style for pointer
Make some syntax change to follow coding style.
|
|
6460e8ab
|
2019-06-23T18:13:29
|
|
internal: use off64_t instead of git_off_t
Prefer `off64_t` internally.
|
|
02683b20
|
2019-01-12T23:06:39
|
|
regexec: prefix all regexec function calls with p_
Prefix all the calls to the the regexec family of functions with `p_`.
This allows us to swap out all the regular expression functions with our
own implementation. Move the declarations to `posix_regex.h` for
simpler inclusion.
|
|
abb04caa
|
2018-02-01T15:55:48
|
|
consistent header guards
use consistent names for the #include / #define header guard pattern.
|
|
7ece9065
|
2017-04-03T23:07:16
|
|
win32: make posix emulation retries configurable
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.
|
|
d5e6ca1e
|
2017-01-14T18:39:32
|
|
Allow to configure default file share mode for opening files
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>
|
|
ab96ca55
|
2016-10-06T13:15:31
|
|
Make sure we use the `C` locale for `regcomp` on macOS.
|
|
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.
|
|
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.
|
|
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).
|
|
1a7ea63d
|
2015-03-05T17:11:17
|
|
Move definitions of strcasecmp and strncasecmp to msvc-compat.h
should cut down on compiler warnings with mingw
|
|
7e9b21aa
|
2015-02-27T08:54:48
|
|
Fix p_ftruncate to handle big files for git_clone
|
|
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:\)
|
|
07d03d31
|
2014-07-13T16:40:51
|
|
Introduce some consistency in definition/declaration ordering
|
|
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)
|
|
72090514
|
2014-07-05T21:27:21
|
|
Secure CRT is only available from Visual Studio 2005+
|
|
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
|
|
65477db1
|
2014-04-21T23:32:31
|
|
Handle win32 reparse points properly
|
|
c2c81615
|
2014-04-19T18:05:31
|
|
Win32: UTF-8 <-> WCHAR conversion overhaul
|
|
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.
|
|
d4cff0cb
|
2013-08-13T09:40:32
|
|
Rename git__win32_path fns to git_win32_path
|
|
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.
|
|
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.
|
|
359fc2d2
|
2013-01-08T17:07:25
|
|
update copyrights
|
|
cccacac5
|
2012-11-14T22:41:51
|
|
Add POSIX compat lstat() variant for win32
The existing p_lstat implementation on win32 is not quite POSIX
compliant when setting errno to ENOTDIR. This adds an option to
make is be compliant so that code (such as checkout) that cares
to have separate behavior for ENOTDIR can use it portably.
This also contains a couple of other minor cleanups in the
posix_w32.c implementations to avoid unnecessary work.
|
|
345eef23
|
2012-11-07T16:10:57
|
|
Move inet_pton to posix platform-compatibility layer
|
|
824d5e4d
|
2012-10-11T11:58:00
|
|
Always use internal fnmatch, not system
|
|
0f4c6175
|
2012-08-28T22:19:08
|
|
Add bounds checking to UTF-8 conversion
|
|
6813169a
|
2012-08-06T12:45:59
|
|
windows: Keep UTF-8 on the stack yo
|
|
e9ca852e
|
2012-08-23T09:20:17
|
|
Fix warnings and merge issues on Win64
|
|
ca1b6e54
|
2012-07-31T17:02:54
|
|
Add template dir and set gid to repo init
This extends git_repository_init_ext further with support for
initializing the repository from an external template directory
and with support for the "create shared" type flags that make a
set GID repository directory.
This also adds tests for much of the new functionality to the
existing `repo/init.c` test suite.
Also, this adds a bunch of new utility functions including a
very general purpose `git_futils_mkdir` (with the ability to
make paths and to chmod the paths post-creation) and a file
tree copying function `git_futils_cp_r`. Also, this includes
some new path functions that were useful to keep the code
simple.
|
|
1d68fcd0
|
2012-07-16T16:16:11
|
|
Checkout: handle symlinks.
Includes unfinished win32 implementation.
|
|
9ecf860d
|
2012-06-06T13:24:25
|
|
Rename posix wrappers with 'p_' prefix.
|
|
56a5000d
|
2012-06-05T12:52:44
|
|
Merge branch 'development' into rev-parse
Conflicts:
src/util.h
tests-clar/refs/branches/listall.c
|
|
1ce4cc01
|
2012-05-15T15:41:05
|
|
Fix date.c build in msvc.
Ported the win32 implementations of gmtime_r,
localtime_r, and gettimeofday to be part of the
posix compatibility layer, and fixed
git_signature_now to use them.
|
|
ec42eafd
|
2012-05-09T22:30:57
|
|
Hook up Windows compat fnmatch() for Solaris
Since Solaris does not support some of the same flags as glibc fnmatch(),
we just use the implementation we have for Windows.
Now that it's no longer a windows-specific thing, I moved it into compat/
instead of win32/
|
|
3191ae89
|
2012-05-06T13:04:12
|
|
compat: make p_open able to accept optional mode when passing the O_CREAT flag
This has the nice side effect of making test_attr_repo__staging_properly_normalizes_line_endings_according_to_gitattributes_directives() test pass again on Windows. This test started to fail after commit 674a198 was applied.
|
|
44ef8b1b
|
2012-04-13T13:00:10
|
|
Fix warnings on 64-bit windows builds
This fixes all the warnings on win64 except those in deps, which
come from the regex code.
|
|
854eccbb
|
2012-02-29T12:04:59
|
|
Clean up GIT_UNUSED macros on all platforms
It turns out that commit 31e9cfc4cbcaf1b38cdd3dbe3282a8f57e5366a5
did not fix the GIT_USUSED behavior on all platforms. This commit
walks through and really cleans things up more thoroughly, getting
rid of the unnecessary stuff.
To remove the use of some GIT_UNUSED, I ended up adding a couple
of new iterators for hashtables that allow you to iterator just
over keys or just over values.
In making this change, I found a bug in the clar tests (where we
were doing *count++ but meant to do (*count)++ to increment the
value). I fixed that but then found the test failing because it
was not really using an empty repo. So, I took some of the code
that I wrote for iterator testing and moved it to clar_helpers.c,
then made use of that to make it easier to open fixtures on a
per test basis even within a single test file.
|
|
2705576b
|
2012-01-24T14:06:42
|
|
Simplify GIT_UNUSED macros
Since casting to void works to eliminate errors with unused
parameters on all platforms, avoid the various special cases.
Over time, it will make sense to eliminate the GIT_UNUSED
macro completely and just have GIT_UNUSED_ARG.
|
|
5e0de328
|
2012-02-13T17:10:24
|
|
Update Copyright header
Signed-off-by: schu <schu-github@schulog.org>
|
|
0c49ec2d
|
2011-11-07T19:34:24
|
|
Implement p_rename
Move the callers of git_futils_mv_atomic to use p_rename.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
89fb8f02
|
2011-10-28T19:04:23
|
|
Merge pull request #456 from brodie/perm-fixes
Create objects, indexes, and directories with the right file permissions
|
|
3286c408
|
2011-10-28T14:51:13
|
|
global: Properly use `git__` memory wrappers
Ensure that all memory related functions (malloc, calloc, strdup, free,
etc) are using their respective `git__` wrappers.
|
|
11d51ca6
|
2011-10-26T16:43:55
|
|
windows: Add support for non-UTF codepages
Our previous assumption that all paths in Windows are encoded in UTF-8
is rather weak, specially when considering that Git is
encoding-agnostic.
These set of functions allow the user to change the library's active
codepage globally, so it is possible to access paths and files on all
international versions of Windows.
Note that the default encoding here is UTF-8 because we assume that 99%
of all Git repositories will be in UTF-8.
Also, if you use non-ascii characters in paths, anywhere, please burn on
a fire.
|
|
33127043
|
2011-10-14T14:18:02
|
|
fileops/posix: replace usage of "int mode" with "mode_t mode"
Note: Functions exported from fileops take const mode_t, while the
underlying POSIX wrappers take mode_t.
|
|
c060854e
|
2011-10-04T21:11:51
|
|
msvc: Properly handle inttypes.h/stdint.h
|
|
6c8b458d
|
2011-09-29T17:04:45
|
|
mingw: Fix compilation warnings
|
|
dd44887a
|
2011-09-23T00:00:05
|
|
Implment p_access and use it in git_fileutils_exists
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
7998ae5a
|
2011-09-19T12:36:12
|
|
Rewrite p_* functions to use Unicode and marshal to UTF8 internally
|
|
222d057c
|
2011-09-19T10:34:52
|
|
Create cross-platform setenv
|
|
bb742ede
|
2011-09-19T01:54:32
|
|
Cleanup legal data
1. The license header is technically not valid if it doesn't have a
copyright signature.
2. The COPYING file has been updated with the different licenses used in
the project.
3. The full GPLv2 header in each file annoys me.
|
|
f978b748
|
2011-08-30T13:34:14
|
|
compat: Move `mkstemp` to the POSIX compat layer
|
|
84dd3820
|
2011-08-18T02:13:51
|
|
posix: Properly handle `snprintf` in all platforms
|
|
2fc78e70
|
2011-07-08T23:01:37
|
|
posix: Portable `vsnprintf`
Our good, lovely folks at Microsoft decided that there was no good
reason to make `vsnprintf` compilant with the C standard, so that
function in Windows returns -1 on overflow, instead of returning the
actual byte count needed to write the full string.
We now handle this situation more gracefully with the POSIX
compatibility layer, by returning the needed byte size using an
auxiliary method instead of blindly resizing the target buffer until it
fits.
This means we can now support `printf`s of any size by allocating a
temporary buffer. That's good.
|
|
e9c6571d
|
2011-07-06T01:04:04
|
|
fnmatch: Use native on Unix, emulate on Win32
|
|
19ac1ed7
|
2011-07-04T21:33:26
|
|
fileops: Fix stat() on directories for W32
The `stat` methods were having issues when called with a trailing slash
in Windows platforms.
We now use GetFileAttributes() where possible, which doesn't have this
restriction.
|
|
5ad739e8
|
2011-07-04T20:05:11
|
|
fileops: Drop `git_fileops_prettify_path`
The old `git_fileops_prettify_path` has been replaced with
`git_path_prettify`. This is a much simpler method that uses the OS's
`realpath` call to obtain the full path for directories and resolve
symlinks.
The `realpath` syscall is the original POSIX call in Unix system and
an emulated version under Windows using the Windows API.
|
|
f79026b4
|
2011-07-04T11:43:34
|
|
fileops: Cleanup
Cleaned up the structure of the whole OS-abstraction layer.
fileops.c now contains a set of utility methods for file management used
by the library. These are abstractions on top of the original POSIX
calls.
There's a new file called `posix.c` that contains
emulations/reimplementations of all the POSIX calls the library uses.
These are prefixed with `p_`. There's a specific posix file for each
platform (win32 and unix).
All the path-related methods have been moved from `utils.c` to `path.c`
and have their own prefix.
|