src/unix


Log

Author Commit Date CI Message
Russell Belfer 85bd1746 2012-08-22T16:03:35 Some cleanup suggested during review This cleans up a number of items suggested during code review with @vmg, including: * renaming "outside repo" config API to `git_config_open_default` * killing the `git_config_open_global` API * removing the `git_` prefix from the static functions in fileops * removing some unnecessary functionality from the "cp" command
Russell Belfer 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.
Ben Straub bfc65634 2012-07-17T08:08:34 Merge branch 'development' into clone
Ben Straub 1d68fcd0 2012-07-16T16:16:11 Checkout: handle symlinks. Includes unfinished win32 implementation.
Chris Young 96ef3d84 2012-06-13T23:16:14 Make this more generic and mergeable. Needs AmigaOS.cmake now from CMake package at OS4Depot, or contents below: --8<-- SET(AMIGA 1) SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") --8<--
Chris Young 2aeadb9c 2012-06-12T19:25:09 Actually do the mmap... unsurprisingly, this makes the indexer work on SFS On RAM: the .idx and .pack files become links to a .lock and the original download respectively. Assume some feature (such as record locking) supported by SFS but not JXFS or RAM: is required.
Chris Young 90490113 2012-06-10T18:08:15 Basic mmap/munmap compatiblity
Chris Young 2774ccb8 2012-06-07T20:40:34 no fnmatch.h
Chris Young c3f35902 2012-06-07T20:29:22 Merge remote-tracking branch 'source/development' into update-test Merging main libgit2! Conflicts: CMakeLists.txt src/unix/map.c
Chris Young 82c23c58 2012-06-05T12:06:40 Assume this is irrelevant for now
Scott J. Goldman 6fb1c0b4 2012-05-09T23:45:55 Fix readdir_r() usage for Solaris On Solaris, struct dirent is defined differently than Linux. The field containing the path name is of size 0, rather than NAME_MAX. So, we need to use a properly sized buffer on Solaris to avoid a stack overflow. Also fix some DIR* leaks on cleanup.
Scott J. Goldman 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/
Russell Belfer e3c47510 2012-03-13T14:23:24 Resolve comments from pull request This converts the map validation function into a macro, tweaks the GITERR_OS system error automatic appending, and adds a tentative new error access API and some quick unit tests for both the old and new error APIs.
Russell Belfer e1de726c 2012-03-12T22:55:40 Migrate ODB files to new error handling This migrates odb.c, odb_loose.c, odb_pack.c and pack.c to the new style of error handling. Also got the unix and win32 versions of map.c. There are some minor changes to other files but no others were completely converted. This also contains an update to filebuf so that a zeroed out filebuf will not think that the fd (== 0) is actually open (and inadvertently call close() on fd 0 if cleaned up). Lastly, this was built and tested on win32 and contains a bunch of fixes for the win32 build which was pretty broken.
Russell Belfer 74fa4bfa 2012-02-28T16:14:47 Update diff to use iterators This is a major reorganization of the diff code. This changes the diff functions to use the iterators for traversing the content. This allowed a lot of code to be simplified. Also, this moved the functions relating to outputting a diff into a new file (diff_output.c). This includes a number of other changes - adding utility functions, extending iterators, etc. plus more tests for the diff code. This also takes the example diff.c program much further in terms of emulating git-diff command line options.
Russell Belfer 290f240e 2012-02-23T11:16:47 Fix readdir usage across platforms This fixes the missing readdir_r from win32 and fixes other platforms to always use the reentrant readdir_r form for reading directory contents.
schu 5e0de328 2012-02-13T17:10:24 Update Copyright header Signed-off-by: schu <schu-github@schulog.org>
Paul Betts 222d057c 2011-09-19T10:34:52 Create cross-platform setenv
Vicent Marti 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.
Vicent Marti f978b748 2011-08-30T13:34:14 compat: Move `mkstemp` to the POSIX compat layer
Vicent Marti 84dd3820 2011-08-18T02:13:51 posix: Properly handle `snprintf` in all platforms
schu 7fade6c6 2011-08-17T12:14:12 unix/posix.h: remove redundant include Signed-off-by: schu <schu-github@schulog.org>
Vicent Marti 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.
Vicent Marti e9c6571d 2011-07-06T01:04:04 fnmatch: Use native on Unix, emulate on Win32
Vicent Marti 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.
Vicent Marti 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.
Vicent Marti 678e9e04 2011-07-03T13:33:43 build: Move OS-specific compat to their own folders
Vicent Marti 17d52304 2011-07-01T17:26:23 build: Simplify build structure This will make libgit2 more suitable for embedding.
Jakob Pfender 450ac186 2011-05-19T15:29:22 unix/map.c: Move to new error handling mechanism
Alex Budovski f0bde7fa 2011-01-11T16:07:45 Revised platform types to use 'best supported' size. This will allow graceful migration to 64 bit file sizes and timestamps should git's binary interface be extended to allow this.
Vicent Marti 9f54fe48 2010-12-23T00:15:09 Remove git_errno It was not being used by any methods (only by malloc and calloc), and since it needs to be TLS, it cannot be exported on DLLs on Windows. Burn it with fire. The API always returns error codes! Signed-off-by: Vicent Marti <tanoku@gmail.com>
Ramsay Jones 79ca2edc 2009-03-20T19:51:48 win32: Add routines to abstract memory-mapped file functions In particular, the git__mmap() and git__munmap() routines provide the interface to platform specific memory-mapped file facilities. We provide implementations for unix and win32, which can be found in their own sub-directories. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>