1. 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
  2. 30 Mar, 2018 1 commit
  3. 29 Mar, 2018 2 commits
  4. 28 Mar, 2018 2 commits
  5. 27 Mar, 2018 10 commits
  6. 26 Mar, 2018 2 commits
  7. 23 Mar, 2018 3 commits
  8. 20 Mar, 2018 3 commits
  9. 19 Mar, 2018 11 commits
  10. 13 Mar, 2018 1 commit
  11. 12 Mar, 2018 2 commits
  12. 11 Mar, 2018 1 commit
  13. 10 Mar, 2018 1 commit
    • index: error out on unreasonable prefix-compressed path lengths · 3db1af1f
      When computing the complete path length from the encoded
      prefix-compressed path, we end up just allocating the complete path
      without ever checking what the encoded path length actually is. This can
      easily lead to a denial of service by just encoding an unreasonable long
      path name inside of the index. Git already enforces a maximum path
      length of 4096 bytes. As we also have that enforcement ready in some
      places, just make sure that the resulting path is smaller than
      GIT_PATH_MAX.
      
      Reported-by: Krishna Ram Prakash R <krp@gtux.in>
      Reported-by: Vivek Parikh <viv0411.parikh@gmail.com>
      Patrick Steinhardt committed