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

CommitService.getCommit() can't find some commits with Git 2.11+ installed


      This bug report relates to a problem seen in the bitbucket-submodule-safe-hook as described here: https://bitbucket.org/atlassianlabs/bitbucket-submodule-safe-hook/issues/1/doesnt-seemt-to-find-the-parent-commit

      That hook implements a pre-receive repository hook and for each sub-module pushed, if the submodule repository resides on the same Bitbucket Server instance, it will look up the commit being referenced. If it cannot find the commit in the submodule the push will be rejected. It uses CommitService.getCommit() to do this. When Git 2.11, 2.12 or 2.13 is installed on the server CommitService.getCommit() fails to return commits that are known to exist in the submodule repository.

      This problem appears specific to the case where the repository passed to "CommitService.getCommit()" is different to the repository being pushed to.

      Note: This only impactes Bitbucket Server 4.13 and later, since versions prior do not support Git 2.11.

      Work Around
      Use Git 2.10 (or other supported version earlier than 2.11) on the Bitbucket Server instance.

            Unassigned Unassigned
            behumphreys Ben Humphreys
            2 Vote for this issue
            9 Start watching this issue