docs: function loadRootAndCommitObject(project) {
          var deferred = Q.defer();
          if (data.newHash !== '') {
              project.loadObject(data.newHash)
                  .then(function (commitObject) {
                      fullEventData.commitObject = commitObject;
                      return project.loadObject(commitObject.root);
                  })
                  .then(function (rootObject) {
                      fullEventData.coreObjects.push(rootObject);
                      deferred.resolve(project);
                  })
                  .catch(function (err) {
                      self.logger.error(err.message);
                      deferred.reject(new Error('Tried to setBranchHash to invalid or non-existing commit, err: ' +
                          err.message));
                  });
          } else {
              // When deleting a branch there no need to ensure this.
              deferred.resolve(project);
          }
  
          return deferred.promise;
      }