1. 03 Jul, 2017 1 commit
    • Make sure to always include "common.h" first · 0c7f49dd
      Next to including several files, our "common.h" header also declares
      various macros which are then used throughout the project. As such, we
      have to make sure to always include this file first in all
      implementation files. Otherwise, we might encounter problems or even
      silent behavioural differences due to macros or defines not being
      defined as they should be. So in fact, our header and implementation
      files should make sure to always include "common.h" first.
      
      This commit does so by establishing a common include pattern. Header
      files inside of "src" will now always include "common.h" as its first
      other file, separated by a newline from all the other includes to make
      it stand out as special. There are two cases for the implementation
      files. If they do have a matching header file, they will always include
      this one first, leading to "common.h" being transitively included as
      first file. If they do not have a matching header file, they instead
      include "common.h" as first file themselves.
      
      This fixes the outlined problems and will become our standard practice
      for header and source files inside of the "src/" from now on.
      Patrick Steinhardt committed
  2. 10 Feb, 2016 1 commit
  3. 01 May, 2015 1 commit
  4. 13 Feb, 2015 2 commits
  5. 16 Dec, 2014 1 commit
    • win32: use NT-prefixed "\\?\" paths · cceae9a2
      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:\)
      Edward Thomson committed
  6. 23 Apr, 2014 1 commit
  7. 20 Apr, 2014 1 commit
  8. 05 Feb, 2014 1 commit
  9. 10 Aug, 2013 1 commit
  10. 08 Aug, 2013 2 commits
  11. 07 Aug, 2013 1 commit
  12. 05 Aug, 2013 1 commit
  13. 08 Jan, 2013 1 commit
  14. 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
  15. 20 Sep, 2012 1 commit
  16. 29 Aug, 2012 3 commits
  17. 24 May, 2012 1 commit
    • Fix bugs in UTF-8 <-> UTF-16 conversion · 9e35d7fd
      The function to convert UTF-16 to UTF-8 was only allocating a
      buffer of wcslen(utf16str) bytes for the UTF-8 string, but that
      is not sufficient if you have multibyte characters, and so when
      those occured, the conversion was failing.  This updates the
      conversion functions to use the Win APIs to calculate the correct
      buffer lengths.
      
      Also fixes a comparison in the unit tests that would fail if
      you did not have a particular environment variable set.
      Russell Belfer committed
  18. 05 May, 2012 1 commit
  19. 17 Apr, 2012 1 commit
  20. 15 Mar, 2012 1 commit
    • Continue error conversion · deafee7b
      This converts blob.c, fileops.c, and all of the win32 files.
      Also, various minor cleanups throughout the code.  Plus, in
      testing the win32 build, I cleaned up a bunch (although not
      all) of the warnings with the 64-bit build.
      Russell Belfer committed
  21. 13 Feb, 2012 1 commit
  22. 29 Dec, 2011 1 commit
    • Add support for macros and cache flush API. · 73b51450
      Add support for git attribute macro definitions.  Also, add
      support for cache flush API to clear the attribute file content
      cache when needed.
      
      Additionally, improved the handling of global and system files,
      making common utility functions in fileops and converting config
      and attr to both use the common functions.
      
      Adds a bunch more tests and fixed some memory leaks.  Note that
      adding macros required me to use refcounted attribute assignment
      definitions, which complicated, but probably improved memory usage.
      Russell Belfer committed
  23. 29 Oct, 2011 1 commit
  24. 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
  25. 19 Sep, 2011 1 commit