If a mirrored git repository uses LFS, SCM-Manager will now also load the binaries, so that the mirrored repository can be used without missing LFS files.
Validate lfs file checksum to ensure that the file was transferred successfully. If an error occurs, the blob will be deleted to prevent corrupt files inside the storage.
This sets Java 11 for compilation. To do so, this has to use the gradle smp plugin with the pull request scm-manager/gradle-smp-plugin#16. If the smp plugin is not released as version 0.10.4, the version has to be corrected for org.scm-manager.smpin the various build.gradle files.
It might be necessary to delete all build folders when switching between Java 8 and Java 11:
rm -rf build */build scm-plugins/*/build
Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
We unified syntax highlighting and extracted it into a low level module. Syntax highlighting from now on takes place in a web worker, so that the user interface stays responsive. The web worker stops automatically if the number of nodes which should be highlighted exceeds the defined limit we believe the browser can handle.
Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
Co-authored-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
Fixes the problem of unclosed file handles which occur when a repository or pack file is accessed (e.g. asynchronously in a post receive hook) after the file had already been closed. Such open file handle prevents deleting a repositories on Windows.
When using lfs, it could happen that there are files
committed before the `.gitattributes` file was updated.
In these cases, it could occure that we find files, that
are no lfs pointers, although they are marked as lfs files
in the attributes. In these cases we just want to handle
such files just as normal blobs and ignore the fact and
do not fail.
Before, a null pointer exception was thrown, because the
LfsPointer class from jgit returned null, which did raise
the exception in the Optional#of method.
To make SCM-Manager more accessible and to make it easier using scripts against the server, we created a command line interface. This command line interface can be used to perform the default actions like create, modify and delete repositories. It is also very flexible and can be extended by plugins.
The CLI already supports internationalization, help texts, input validation, loose and table-like templates and nested subcommands. Check the cli guidelines to learn how add new cli commands.
Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
This pull request converts the current incomplete textual documentation of the available frontend extension points to in-code definitions that act both as documentation and as type helpers for improving overall code quality. All extension points available in the SCM-Manager core are now available, but no plugin was updated and only those parts of the core codebase had the new types added that did not require runtime changes. The only exception to this is the breadcrumbs, which was a simple change that is fully backwards-compatible.
* Throw more specific exception if compared revisions are ambiguous.
* Add changelog entry
* Move changelog entry in intended folder
* Small typo
Co-authored-by: Florian Scholdei <florian.scholdei@cloudogu.com>
Collapses a folder in code view which only has another folder as its only child. This lets you access a sub-folder which has content directly instead of navigating down the folder tree by clicking every folder separately.
Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
* Update lock files
* Replace usage of org.apache.commons.lang3 with guava
* Update vulnerable version of cron-utils
Update cron-util from version 9.1.3 to 9.1.6.
Version 9.1.6 fixes an arbitrary code execution
vulnerability (CVE-2021-41269).
SCM-Manager is not affected by this issue,
because it is related to the el parsing
of an annotation which we don't use.
Enable gradle dependency locking for all subprojects. This change allows us to use dependency ranges, without loosing reproducible builds.
It also makes it easier for third party services such as snyk to detect dependencies and their versions.
Add branch/tag/revision compare to see diffs and changesets between the source and target revisions. This feature is reachable from the branch/tag detail page and also the source code view.
Co-authored-by: Florian Scholdei <florian.scholdei@cloudogu.com>
Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
Sets the HEAD for new Git repositories to the default branch (this is 'main' for the default configuration).
This change led to errors in unit tests, that depended on the 'master' branch.
Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
On Windows it is much more necessary to close files to avoid locked files which prevent deleting a temporary file or folder. Also paths need to be handled differently because of the drive letter and colon appearing on Windows.