1. 11 Nov, 2017 4 commits
    • parse: implement and use `git_parse_advance_digit` · 252f2eee
      The patch parsing code has multiple recurring patterns where we want to
      parse an actual number. Create a new function `git_parse_advance_digit`
      and use it to avoid code duplication.
      Patrick Steinhardt committed
    • patch_parse: use git_parse_contains_s · 65dcb645
      Instead of manually checking the parsing context's remaining length and
      comparing the leading bytes with a specific string, we can simply re-use
      the function `git_parse_ctx_contains_s`. Do so to avoid code duplication
      and to further decouple patch parsing from the parsing context's struct
      members.
      Patrick Steinhardt committed
    • parse: extract parse module · ef1395f3
      The `git_patch_parse_ctx` encapsulates both parser state as well as
      options specific to patch parsing. To advance this state and keep it
      consistent, we provide a few functions which handle advancing the
      current position and accessing bytes of the patch contents. In fact,
      these functions are quite generic and not related to patch-parsing by
      themselves. Seeing that we have similar logic inside of other modules,
      it becomes quite enticing to extract this functionality into its own
      parser module.
      
      To do so, we create a new module `parse` with a central struct called
      `git_parse_ctx`. It encapsulates both the content that is to be parsed
      as well as its lengths and the current position. `git_patch_parse_ctx`
      now only contains this `parse_ctx` only, which is then accessed whenever
      we need to touch the current parser. This is the first step towards
      re-using this functionality across other modules which require parsing
      functionality and remove code-duplication.
      Patrick Steinhardt committed
    • Merge pull request #4308 from pks-t/pks/header-state-machine · 0393ecc6
      patch_parse: implement state machine for parsing patch headers
      Edward Thomson committed
  2. 10 Nov, 2017 2 commits
  3. 09 Nov, 2017 1 commit
  4. 06 Nov, 2017 4 commits
  5. 04 Nov, 2017 5 commits
  6. 31 Oct, 2017 3 commits
  7. 30 Oct, 2017 7 commits
  8. 29 Oct, 2017 4 commits
  9. 28 Oct, 2017 2 commits
  10. 23 Oct, 2017 8 commits