1. 22 Nov, 2019 1 commit
  2. 20 Jul, 2019 1 commit
  3. 24 Jun, 2019 1 commit
  4. 25 Jan, 2019 1 commit
  5. 22 Jan, 2019 1 commit
  6. 17 Jan, 2019 1 commit
  7. 06 Dec, 2018 1 commit
  8. 04 Dec, 2018 2 commits
  9. 01 Dec, 2018 1 commit
  10. 10 Jun, 2018 1 commit
  11. 09 Feb, 2018 3 commits
  12. 02 Feb, 2018 8 commits
  13. 20 Dec, 2017 2 commits
    • odb_loose: reject objects that cannot fit in memory · 3e6533ba
      Check the size of objects being read from the loose odb backend and
      reject those that would not fit in memory with an error message that
      reflects the actual problem, instead of error'ing later with an
      unintuitive error message regarding truncation or invalid hashes.
      Edward Thomson committed
    • odb: support large loose objects · ddefea75
      zlib will only inflate/deflate an `int`s worth of data at a time.
      We need to loop through large files in order to ensure that we inflate
      the entire file, not just an `int`s worth of data.  Thankfully, we
      already have this loop in our `git_zstream` layer.  Handle large objects
      using the `git_zstream`.
      Edward Thomson committed
  14. 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
  15. 08 Jun, 2017 1 commit
    • settings: rename `GIT_OPT_ENABLE_SYNCHRONOUS_OBJECT_CREATION` · 6c23704d
      Initially, the setting has been solely used to enable the use of
      `fsync()` when creating objects. Since then, the use has been extended
      to also cover references and index files. As the option is not yet part
      of any release, we can still correct this by renaming the option to
      something more sensible, indicating not only correlation to objects.
      
      This commit renames the option to `GIT_OPT_ENABLE_FSYNC_GITDIR`. We also
      move the variable from the object to repository source code.
      Patrick Steinhardt committed
  16. 01 May, 2017 1 commit
  17. 28 Feb, 2017 3 commits
  18. 29 Dec, 2016 1 commit
  19. 04 Aug, 2016 2 commits
  20. 26 May, 2016 1 commit
  21. 02 May, 2016 1 commit
    • odb_loose: fix undefined behavior when computing size · 7f407710
      An object's size is computed by reading the object header's size
      field until the most significant bit is not set anymore. To get
      the total size, we increase the shift on each iteration and add
      the shifted value to the total size.
      
      We read the current value into a variable of type `unsigned
      char`, from which we then take all bits except the most
      significant bit and shift the result. We will end up with a
      maximum shift of 60, but this exceeds the width of the value's
      type, resulting in undefined behavior.
      
      Fix the issue by instead reading the values into a variable of
      type `unsigned long`, which matches the required width. This is
      equivalent to git.git, which uses an `unsigned long` as well.
      Patrick Steinhardt committed
  22. 07 Mar, 2016 1 commit
  23. 17 Sep, 2015 1 commit
    • git_futils_mkdir_*: make a relative-to-base mkdir · ac2fba0e
      Untangle git_futils_mkdir from git_futils_mkdir_ext - the latter
      assumes that we own everything beneath the base, as if it were
      being called with a base of the repository or working directory,
      and is tailored towards checkout and ensuring that there is no
      bogosity beneath the base that must be cleaned up.
      
      This is (at best) slow and (at worst) unsafe in the larger context
      of a filesystem where we do not own things and cannot do things like
      unlink symlinks that are in our way.
      Edward Thomson committed
  24. 13 May, 2015 1 commit
    • odb: make the writestream's size a git_off_t · 77b339f7
      Restricting files to size_t is a silly limitation. The loose backend
      writes to a file directly, so there is no issue in using 63 bits for the
      size.
      
      We still assume that the header is going to fit in 64 bytes, which does
      mean quite a bit smaller files due to the run-length encoding, but it's
      still a much larger size than you would want Git to handle.
      Carlos Martín Nieto committed
  25. 13 Feb, 2015 2 commits