1. 22 Jan, 2019 1 commit
  2. 01 Dec, 2018 1 commit
  3. 28 Nov, 2018 2 commits
  4. 17 Sep, 2018 2 commits
    • revwalk: only check the first commit in the list for an earlier timestamp · 12a1790d
      This is not a big deal, but it does make us match git more closely by checking
      only the first. The lists are sorted already, so there should be no functional
      difference other than removing a possible check from every iteration in the
      loop.
      Carlos Martín Nieto committed
    • revwalk: use the max value for a signed integer · 46f35127
      When porting, we overlooked that the difference between git's and our's time
      representation and copied their way of getting the max value.
      
      Unfortunately git was using unsigned integers, so `~0ll` does correspond to
      their max value, whereas for us it corresponds to `-1`. This means that we
      always consider the last date to be smaller than the current commit's and always
      think commits are interesting.
      
      Change the initial value to the macro that gives us the maximum value on each
      platform so we can accurately consider commits interesting or not.
      Carlos Martín Nieto committed
  5. 20 Aug, 2018 1 commit
  6. 29 Jul, 2018 1 commit
  7. 22 Jun, 2018 1 commit
    • Clear revwalk sorting when resetting · 4fd81c53
      Currently we fail to clear the sorting flag for revwalks when resetting.
      This caused a poor interaction with the limited flag during a recent
      patch. This patch clears the revwalk sorting flag and causes it to no
      longer persist over resets.
      Nika Layzell committed
  8. 18 Jun, 2018 1 commit
  9. 10 Jun, 2018 1 commit
  10. 12 Apr, 2018 2 commits
    • revwalk: fix uninteresting revs sometimes not limiting graphwalk · 54fd80e3
      When we want to limit our graphwalk, we use the heuristic of checking
      whether the newest limiting (uninteresting) revision is newer than the
      oldest interesting revision. We do so by inspecting whether the first
      item's commit time of the user-supplied list of revisions is newer than
      the last added interesting revision. This is wrong though, as the user
      supplied list is in no way guaranteed to be sorted by increasing commit
      dates. This could lead us to abort the revwalk early before applying all
      relevant limiting revisions, outputting revisions which should in fact
      have been hidden.
      
      Fix the heuristic by instead checking whether _any_ of the limiting
      commits was made earlier than the last interesting commit. Add a test.
      Patrick Steinhardt committed
    • revwalk: remove one useless layer of functions · ef682410
      We don't currently need to have anything that's different between `get_revision`
      and `get_one_revision` so let's just remove the inner function and make the code
      more straightforward.
      Carlos Martín Nieto committed
  11. 01 Apr, 2018 1 commit
    • revwalk: avoid walking the entire history when output is unsorted · 2a6d0956
      As part of reducing our divergence from git, its code for revwalk was ported
      into our codebase. A detail about when to limit the list was lost and we ended
      up always calling that code.
      
      Limiting the list means performing the walk and creating the final list of
      commits to be output during the preparation stage. This is unavoidable when
      sorting and when there are negative refs.
      
      We did this even when asked for unsorted output with no negative refs, which you
      might do to retrieve something like the "last 10 commits on HEAD" for a
      nominally unsorted meaning of "last".
      
      This commit adds and sets a flag indicating when we do need to limit the list,
      letting us avoid doing so when we can. The previously mentioned query thus no
      longer loads the entire history of the project during the prepare stage, but
      loads it iteratively during the walk.
      Carlos Martín Nieto committed
  12. 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
  13. 09 Mar, 2017 1 commit
  14. 17 Feb, 2017 7 commits
  15. 29 Dec, 2016 1 commit
  16. 12 Dec, 2016 1 commit
  17. 06 Oct, 2016 7 commits
  18. 23 Feb, 2016 1 commit
  19. 28 Oct, 2015 1 commit
  20. 31 Jul, 2015 1 commit
  21. 14 Apr, 2015 1 commit
    • revwalk: detect when we're out of interesting commits · a0541695
      When walking backwards and marking parents uninteresting, make sure we
      detect when the list of commits we have left has run out of
      uninteresting commits so we can stop marking commits as
      uninteresting. Failing to do so can mean that we walk the whole history
      marking everything uninteresting, which eats up time, CPU and IO for
      with useless work.
      
      While pre-marking does look for this, we still need to check during the
      main traversal as there are setups for which pre-marking does not leave
      enough information in the commits. This can happen if we push a commit
      and hide its parent.
      Carlos Martín Nieto committed
  22. 08 Apr, 2015 1 commit
  23. 11 Mar, 2015 1 commit
  24. 13 Feb, 2015 1 commit
  25. 22 Nov, 2014 1 commit
    • peel: reject bad queries with EINVALIDSPEC · 753e17b0
      There are some combination of objects and target types which we know
      cannot be fulfilled. Return EINVALIDSPEC for those to signify that there
      is a mismatch in the user-provided data and what the object model is
      capable of satisfying.
      
      If we start at a tag and in the course of peeling find out that we
      cannot reach a particular type, we return EPEEL.
      Carlos Martín Nieto committed