1. 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
  2. 19 May, 2017 1 commit
    • indexer: name pack files after trailer hash · c0e54155
      Upstream git.git has changed the way how packfiles are named.
      Previously, they were using a hash of the contained object's OIDs, which
      has then been changed to use the hash of the complete packfile instead.
      See 1190a1acf (pack-objects: name pack files after trailer hash,
      2013-12-05) in the git.git repository for more information on this
      change.
      
      This commit changes our logic to match the behavior of core git.
      Chris Hescock committed
  3. 02 Mar, 2017 1 commit
  4. 28 Feb, 2017 3 commits
  5. 17 Feb, 2017 6 commits
  6. 21 Jan, 2017 3 commits
  7. 14 Jan, 2017 1 commit
  8. 04 Jan, 2017 1 commit
  9. 01 Jan, 2017 1 commit
  10. 29 Dec, 2016 2 commits
  11. 16 Mar, 2016 1 commit
  12. 13 Jan, 2016 1 commit
  13. 04 Jan, 2016 1 commit
  14. 31 Jul, 2015 1 commit
  15. 09 Jun, 2015 1 commit
  16. 02 Jun, 2015 1 commit
    • indexer: use lseek to extend the packfile · aa57231f
      We've been using `p_ftruncate()` to extend the packfile in order to mmap
      it and write the new data into it. This works well in the general case,
      but as truncation does not allocate space in the filesystem, it must do
      so when we write data to it.
      
      The only way the OS has to indicate a failure to allocate space is via
      SIGBUS which means we tried to write outside the file. This will cause
      everyone to crash as they don't expect to handle this signal.
      
      Switch to using `p_lseek()` and `p_write()` to extend the file in a way
      which tells the filesystem to allocate the space for the missing
      data. We can then be sure that we have space to write into.
      Carlos Martín Nieto committed
  17. 22 May, 2015 1 commit
  18. 13 Mar, 2015 3 commits
  19. 11 Mar, 2015 1 commit
  20. 09 Dec, 2014 1 commit
  21. 21 Nov, 2014 1 commit
  22. 19 Nov, 2014 1 commit
  23. 09 Jul, 2014 1 commit
  24. 27 Jun, 2014 1 commit
  25. 23 Jun, 2014 1 commit
    • Share packs across repository instances · b3b66c57
      Opening the same repository multiple times will currently open the same
      file multiple times, as well as map the same region of the file multiple
      times. This is not necessary, as the packfile data is immutable.
      
      Instead of opening and closing packfiles directly, introduce an
      indirection and allocate packfiles globally. This does mean locking on
      each packfile open, but we already use this lock for the global mwindow
      list so it doesn't introduce a new contention point.
      Carlos Martín Nieto committed
  26. 20 May, 2014 1 commit
  27. 18 May, 2014 1 commit
  28. 16 May, 2014 1 commit
    • indexer: mmap fixes for Windows · 0731a5b4
      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
      Carlos Martín Nieto committed