1. 27 Jul, 2021 3 commits
    • Swap the order of the `git_graph_reachable_from_any` params · 8d453f16
      len, array -> array, len
      lhchavez committed
    • graph: Create `git_graph_reachable_from_any()` · ce5400cd
      This change introduces a new API function
      `git_graph_reachable_from_any()`, that answers the question whether a
      commit is reachable from any of the provided commits through following
      parent edges.
      
      This function can take advantage of optimizations provided by the
      existence of a `commit-graph` file, since it makes it faster to know
      whether, given two commits X and Y, X cannot possibly be an reachable
      from Y.
      
      Part of: #5757
      lhchavez committed
    • 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
  2. 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
  3. 12 Dec, 2016 1 commit
  4. 28 Aug, 2014 1 commit
    • graph: fix ahead-behind logic · 05f0d0c1
      When we see PARENT1, it means there is a local commit and thus we are
      ahead. Likewise, seeing PARENT2 means that the upstream branch has a
      commit and we are one more behind.
      
      The logic is currently reversed. Correct it.
      
      This fixes #2501.
      Carlos Martín Nieto committed
  5. 08 Apr, 2014 2 commits
  6. 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
  7. 28 Jan, 2014 1 commit
  8. 22 Mar, 2013 1 commit
  9. 08 Jan, 2013 1 commit
  10. 10 Dec, 2012 4 commits
  11. 30 Nov, 2012 2 commits
  12. 29 Nov, 2012 2 commits