Skip to content
Snippets Groups Projects
  1. Apr 17, 2018
  2. Mar 16, 2018
  3. Mar 15, 2018
  4. Feb 22, 2018
    • Sean McGivern's avatar
      Fix 500 error when diff context line has broken encoding · cdf3ae04
      Sean McGivern authored
      Rugged sometimes chops a context line in between bytes, resulting in the context
      line having an invalid encoding: https://github.com/libgit2/rugged/issues/716
      
      When that happens, we will try to detect the encoding for the diff, and
      sometimes we'll get it wrong. If that difference in encoding results in a
      difference in string lengths between the diff and the underlying blobs, we'd
      fail to highlight any inline diffs, and return a 500 status to the user.
      
      As we're using the underlying blobs, the encoding is 'correct' anyway, so if the
      string range is invalid, we can just discard the inline diff highlighting. We
      still report to Sentry to ensure that we can investigate further in future.
      cdf3ae04
  5. Jan 07, 2018
    • Stan Hu's avatar
      Fix error 500 when viewing commit and merge request diffs · c2b7147c
      Stan Hu authored
      Due to the refactoring in !16082, `Blob#batch` no longer falls back
      to a default `blob_size_limit`. Since `Repository#batch_blobs` was using
      a default `nil` value, this would cause issues in the `Blob#find_by_rugged`
      method.
      
      This fix here is to be consistent and use a non-nil default value in
      `Repository#batch_blobs`.
      
      The problem was masked in development and tests because Gitaly is always
      enabled by default for all features.
      
      Closes #41735
      c2b7147c
  6. Jan 04, 2018
    • Sean McGivern's avatar
      Fix error when viewing diffs without blobs · 528b5eeb
      Sean McGivern authored
      Old merge requests can have diffs without corresponding blobs. (This also may be
      possible for commit diffs in corrupt repositories.)
      
      We can't use the `&.` operator on the blobs, because the blob objects are never
      nil, but `BatchLoader` instances that delegate to `Blob`. We can't use
      `Object#try`, because `Blob` doesn't inherit from `Object`.
      
      `BatchLoader` provides a `__sync` method that returns the delegated object, but
      using `itself` also works because it's forwarded, and will work for
      non-`BatchLoader` instances too. So the simplest solution is to just use that
      with the `&.` operator.
      528b5eeb
  7. Dec 07, 2017
  8. Nov 28, 2017
    • Sean McGivern's avatar
      Ensure MRs always use branch refs for comparison · 3c6a4d63
      Sean McGivern authored
      If a merge request was created with a branch name that also matched a tag name,
      we'd generate a comparison to or from the tag respectively, rather than the
      branch. Merging would still use the branch, of course.
      
      To avoid this, ensure that when we get the branch heads, we prepend the
      reference prefix for branches, which will ensure that we generate the correct
      comparison.
      3c6a4d63
  9. Nov 21, 2017
  10. Oct 30, 2017
  11. Oct 15, 2017
  12. Oct 13, 2017
  13. Oct 07, 2017
  14. Sep 25, 2017
  15. Sep 15, 2017
  16. Aug 24, 2017
    • Sean McGivern's avatar
      Show un-highlighted diffs when blobs are the same · e8525e10
      Sean McGivern authored
      For some old merge requests, we don't have enough information to figure out the
      old blob and the new blob for the file. This means that we can't highlight the
      diff correctly, but we can still display it without highlighting.
      e8525e10
  17. Aug 22, 2017
    • Sean McGivern's avatar
      Always return a simple diff viewer · b0f09406
      Sean McGivern authored
      We didn't have a fallback case before, because we believed the conditions were
      exhaustive. They weren't, so we can always fallback to not previewing.
      b0f09406
  18. Aug 17, 2017
  19. Aug 01, 2017
  20. Jul 31, 2017
  21. Jul 27, 2017
  22. Jun 14, 2017
  23. Jun 08, 2017
  24. Jun 06, 2017
  25. May 23, 2017
  26. May 10, 2017
  27. Apr 24, 2017
  28. Apr 20, 2017
  29. Mar 14, 2017
  30. Mar 13, 2017
  31. Feb 23, 2017
  32. Feb 10, 2017
  33. Feb 03, 2017
Loading