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

Pull request merge fails if there are rename-add or directory-file conflicts

    XMLWordPrintable

Details

    Description

      The code that handles merge conflicts runs into a NullPointerException in the ExitHandler for the ResetCommandHandler.

      The reset command is only run for directory/file conflicts (one side of the merge has a directory where the other side has a file, both with changes) or rename/add conflicts (one side of the merge renames a file, the other side adds a file at the same location).

      The error seems to only occur on some versions of git.

      Caused by: java.lang.NullPointerException: null
              at com.atlassian.stash.internal.scm.git.GitCommandExitHandler.isNonZeroExitCodeException(GitCommandExitHandler.java:153) ~[stash-scm-git-2.6.3_1375669598000.jar:na]
              at com.atlassian.stash.internal.scm.git.merge.ResetCommandHandler$ExitHandler.isError(ResetCommandHandler.java:71) ~[stash-scm-git-2.6.3_1375669598000.jar:na]
              at com.atlassian.stash.scm.DefaultCommandExitHandler.onExit(DefaultCommandExitHandler.java:34) ~[stash-spi-2.6.3.jar:na]
              at com.atlassian.stash.scm.BaseCommand.callExitHandler(BaseCommand.java:141) ~[stash-spi-2.6.3.jar:na]
              at com.atlassian.stash.scm.BaseCommand$CommandFuture.internalGet(BaseCommand.java:257) ~[stash-spi-2.6.3.jar:na]
              at com.atlassian.stash.scm.BaseCommand$CommandFuture.get(BaseCommand.java:224) ~[stash-spi-2.6.3.jar:na]
              at com.atlassian.stash.scm.BaseCommand.call(BaseCommand.java:78) ~[stash-spi-2.6.3.jar:na]
              at com.atlassian.stash.internal.scm.git.merge.MergeConflictHandler.flushIf(MergeConflictHandler.java:379) ~[stash-scm-git-2.6.3_1375669598000.jar:na]
              at com.atlassian.stash.internal.scm.git.merge.MergeConflictHandler.flush(MergeConflictHandler.java:107) ~[stash-scm-git-2.6.3_1375669598000.jar:na]
      

      Attachments

        Issue Links

          Activity

            People

              mheemskerk Michael Heemskerk (Inactive)
              mheemskerk Michael Heemskerk (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: