Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-10961

Diff command fails for long paths

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Low Low
    • None
    • 5.11.1
    • None

      Steps to reproduce

      1. Create a DiffContext using DiffContext.Builder and don't set a maxLineLength (or set it to something short).
      2. Call a a diff command using that diff context

      Expected result:

      Diff is streamed into callback like normal

      Actual result:

      DiffOutputHandler fails reading diff header because the max line length is too short.

      Example:

      scmService.getPullRequestCommandFactory(pullRequest)
              .diff(new PullRequestDiffCommandParameters.Builder().maxLineLength(100).build(), new AbstractDiffContentCallback(){});
      

      Workaround

      Set the maxLine length to something long enough to read the full paths involved.

              Unassigned Unassigned
              dkjellin Daniel (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: