1. 15 Nov, 2012 1 commit
    • Add POSIX compat lstat() variant for win32 · cccacac5
      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.
      Russell Belfer committed
  2. 07 Nov, 2012 1 commit
  3. 15 Oct, 2012 1 commit
  4. 29 Aug, 2012 2 commits
  5. 23 Aug, 2012 1 commit
  6. 22 Aug, 2012 1 commit
    • Add template dir and set gid to repo init · ca1b6e54
      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.
      Russell Belfer committed
  7. 16 Jul, 2012 1 commit
  8. 06 Jun, 2012 1 commit
  9. 15 May, 2012 1 commit
  10. 10 May, 2012 1 commit
  11. 07 May, 2012 1 commit
  12. 17 Apr, 2012 1 commit
  13. 02 Mar, 2012 2 commits
    • Clean up GIT_UNUSED macros on all platforms · 854eccbb
      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.
      Russell Belfer committed
    • Simplify GIT_UNUSED macros · 2705576b
      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.
      Russell Belfer committed
  14. 13 Feb, 2012 1 commit
  15. 07 Nov, 2011 1 commit
  16. 29 Oct, 2011 1 commit
  17. 27 Oct, 2011 1 commit
    • windows: Add support for non-UTF codepages · 11d51ca6
      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.
      Vicent Marti committed
  18. 14 Oct, 2011 1 commit
  19. 05 Oct, 2011 1 commit
  20. 29 Sep, 2011 1 commit
  21. 22 Sep, 2011 1 commit
  22. 19 Sep, 2011 2 commits
  23. 18 Sep, 2011 1 commit
    • Cleanup legal data · bb742ede
      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 committed
  24. 30 Aug, 2011 1 commit
  25. 18 Aug, 2011 1 commit
  26. 09 Jul, 2011 1 commit
    • posix: Portable `vsnprintf` · 2fc78e70
      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 committed
  27. 05 Jul, 2011 4 commits
    • fileops: Fix stat() on directories for W32 · 19ac1ed7
      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.
      Vicent Marti committed
    • fileops: Drop `git_fileops_prettify_path` · 5ad739e8
      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 committed
    • fileops: Cleanup · f79026b4
      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 committed