This new modifications provider consistently computes the modifications caused by a push to a branch. In contrast to the changeset provider that often has been used before to check what has changed, this also works for forced updates, rebased branches and fast-forwards. Because these types of changes are normally only used with git, this provider (for now) has only been implemented for git.
Pushed-by: Rene Pfeuffer<rene.pfeuffer@cloudogu.com>
Pushed-by: Alexander Dammeier<alexander.dammeier@cloudogu.com>
Co-authored-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
Committed-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
Pass the ancestor commit as the old revision if it is set in the GitDiffResult. This fixes the image diff renderer if the pull requests consists of multiple commits to show the full diff instead of the changes between the latest two commits.
The initialization to set the default branch in
git repositories should not be executed for
non-git repositories. Otherwise, this throws
exceptions in SVN repositories all the time
because the branch command is not supported.
Committed-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
This fixes the check for LFS files used in git imports
and mirror command.
First this checks for LFS files recursively in the tree
(in other words, before LFS files were found only in
the root directory).
Second, this fixes a bug in the used JGit lfs filter by
checking, whether the checked tree entry is a normal
file. This prevents missing object exceptions during
the check when the repository contains a submodule.
Committed-by: Thomas Zerr <thomas.zerr@cloudogu.com>
Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
The git mirror command did not set the default branch correctly in all cases. If the source repository contained a 'master' branch, no default branch was set. This led to an error in the refresh process, when globally another branch has been configured as dafault (when not changed, this is 'main'), because the working copy should be created with the main branch checked out. Because no default was specified, the globally configured default (by default 'main') had been taken and that branch does not exist in the mirror.
So all subsequent mirror updates failed with a message like this one:
could not find branch with id main in repository with id ...
With this fix, the default branch is always set in the SCM-Manager configuration for the repository and therefore cannot be missing in subsequent updates.
Committed-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>