1. 23 Feb, 2022 1 commit
  2. 27 Jul, 2021 1 commit
    • commit-graph: Introduce `git_commit_list_generation_cmp` · 6f544140
      This change makes calculations of merge-bases a bit faster when there
      are complex graphs and the commit times cause visiting nodes multiple
      times. This is done by visiting the nodes in the graph in reverse
      generation order when the generation number is available instead of
      commit timestamp. If the generation number is missing in any pair of
      commits, it can safely fall back to the old heuristic with no negative
      side-effects.
      
      Part of: #5757
      lhchavez committed
  3. 10 Mar, 2021 1 commit
    • commit-graph: Use the commit-graph in revwalks · 248606eb
      This change makes revwalks a bit faster by using the `commit-graph` file
      (if present). This is thanks to the `commit-graph` allow much faster
      parsing of the commit information by requiring near-zero I/O (aside from
      reading a few dozen bytes off of a `mmap(2)`-ed file) for each commit,
      instead of having to read the ODB, inflate the commit, and parse it.
      
      This is done by modifying `git_commit_list_parse()` and letting it use
      the ODB-owned commit-graph file.
      
      Part of: #5757
      lhchavez committed
  4. 03 Oct, 2019 1 commit
    • commit_list: store in/out-degrees as uint16_t · 5cf17e0f
      The commit list's in- and out-degrees are currently stored as `unsigned
      short`. When assigning it the value of `git_array_size`, which returns
      an `size_t`, this generates a warning on some Win32 platforms due to
      loosing precision.
      
      We could just cast the returned value of `git_array_size`, which would
      work fine for 99.99% of all cases as commits typically have less than
      2^16 parents. For crafted commits though we might end up with a wrong
      value, and thus we should definitely check whether the array size
      actually fits into the field.
      
      To ease the check, let's convert the fields to store the degrees as
      `uint16_t`. We shouldn't rely on such unspecific types anyway, as it may
      lead to different behaviour across platforms. Furthermore, this commit
      introduces a new `git__is_uint16` function to check whether it actually
      fits -- if not, we return an error.
      Patrick Steinhardt committed
  5. 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
  6. 06 Oct, 2016 1 commit
    • revwalk: get closer to git · 6708618c
      We had some home-grown logic to figure out which objects to show during
      the revision walk, but it was rather inefficient, looking over the same
      list multiple times to figure out when we had run out of interesting
      commits. We now use the lists in a smarter way.
      
      We also introduce the slop mechanism to determine when to stpo
      looking. When we run out of interesting objects, we continue preparing
      the walk for another 5 rounds in order to make it less likely that we
      miss objects in situations with complex graphs.
      Carlos Martín Nieto committed
  7. 02 Nov, 2015 1 commit
  8. 14 Oct, 2015 1 commit
  9. 10 Oct, 2014 1 commit
  10. 30 Apr, 2014 1 commit
  11. 04 Feb, 2014 1 commit
    • Replace pqueue with code from hashsig heap · 4075e060
      I accidentally wrote a separate priority queue implementation when
      I was working on file rename detection as part of the file hash
      signature calculation code.  To simplify licensing terms, I just
      adapted that to a general purpose priority queue and replace the
      old priority queue implementation that was borrowed from elsewhere.
      
      This also removes parts of the COPYING document that no longer
      apply to libgit2.
      Russell Belfer committed
  12. 08 Jan, 2013 1 commit
  13. 27 Nov, 2012 1 commit