Commit Graph

396 Commits

Author SHA1 Message Date
Konstantin Schaper
2d024fe210 update head of scm-git-spi-test.zip back to master 2020-09-17 09:15:53 +02:00
Konstantin Schaper
b30a97948e implement git rebase 2020-09-15 15:48:22 +02:00
René Pfeuffer
96d16fe4cc "Unpeel" annotated tags to get correct changeset
If we just parse the object id of the reference for annotated tags, we
get the annotated tag object and not the reference the tag refers to.
2020-08-27 11:15:13 +02:00
René Pfeuffer
565ec3ff3c Cleanup 2020-08-27 10:48:54 +02:00
Konstantin Schaper
15fac8ba2c remove ref usage and directly use objectId 2020-08-26 15:06:00 +02:00
Konstantin Schaper
ecfc70eb77 wip refactoring 2020-08-26 10:01:51 +02:00
Konstantin Schaper
36231d077a cleanup and update tests 2020-08-25 18:08:31 +02:00
Konstantin Schaper
6d409c65c0 initial implementation 2020-08-25 14:45:48 +02:00
Konstantin Schaper
5a5289f381 fix merge issues 2020-08-11 15:04:52 +02:00
Konstantin Schaper
8576b66559 Merge branch 'develop' into feature/create_gpg_signatures
# Conflicts:
#	CHANGELOG.md
#	scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitHookContextProvider.java
#	scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitLogCommand.java
#	scm-plugins/scm-git-plugin/src/main/java/sonia/scm/web/GitReceiveHook.java
2020-08-11 13:33:21 +02:00
Konstantin Schaper
0601770262 resolve review findings 2020-08-11 13:28:16 +02:00
Sebastian Sdorra
e7535903f7 Fix unit test on platforms which are not using UTF-8 as default 2020-08-10 09:22:29 +02:00
René Pfeuffer
a3a26c057e Cleanup 2020-08-07 10:53:08 +02:00
René Pfeuffer
2433c50d64 Add test for "real" merge commits 2020-08-07 08:01:13 +02:00
René Pfeuffer
6f20781812 Add first integration tests for merge detection 2020-08-06 17:12:14 +02:00
Konstantin Schaper
7072761ba1 implementation and unit tests 2020-08-05 13:02:02 +02:00
Eduard Heimbuch
b22ead23de show signature key on changeset 2020-07-29 15:43:14 +02:00
Eduard Heimbuch
ebb6a1fdb8 Merge branch 'develop' into feature/verify_gpg_signatures 2020-07-28 12:36:15 +02:00
Eduard Heimbuch
5e10f6b730 Invalidate branches cache synchronously on create new branch 2020-07-22 10:20:37 +02:00
Sebastian Sdorra
64da676348 revisit gpg api and use it with from git plugin 2020-07-22 08:22:04 +02:00
Sebastian Sdorra
7cb349242c introduces GitChangesetConverterFactory
This change introduces a GitChangesetConverterFactory to allow injections for the GitChangesetConverter.
2020-07-21 07:34:14 +02:00
Sebastian Sdorra
6e27051ed9 use child injector pattern for git commands
We are using a Google Guice child injector to reduce the amount of injection dependencies for the GitRepositoryServiceResolver and the GitRepositoryServiceProvider.
2020-07-20 16:18:00 +02:00
René Pfeuffer
086a471161 Fix migration of non-bare git repositories
During the migration of git repositories from v1 to v2, we have to
create an "scmm" config section with the repository id of the current
repository. If this does not happen, further write requests to this
repository will fail, because the hooks cannot determine the id.

However, the migration failed to write this configuration for non-bare
repositories. Therefore this fix checks beforehand, whether a '.git'
folder exists in the date directory. If this is the case, we assume that
this is a non-bare repository and write the config file inside this
folder.
2020-06-23 11:47:52 +02:00
René Pfeuffer
3e5ee53dc2 Adapt test to change from 52a09a9 2020-06-17 11:16:04 +02:00
Sebastian Sdorra
acc3306450 rename trailer to contributor 2020-06-10 11:08:11 +02:00
René Pfeuffer
cf02192315 Extract committer as trailer in git 2020-06-08 12:21:17 +02:00
René Pfeuffer
77d6784386 Remove unnecessary interfaces 2020-06-02 21:31:44 +02:00
René Pfeuffer
4c73f27389 Make reclaimer and initializer top level classes 2020-06-02 21:31:44 +02:00
René Pfeuffer
f74b7626eb New package for working copy related classes 2020-06-02 21:31:44 +02:00
René Pfeuffer
8bd17a03d7 Use better names
The name 'workdir' is now only used for a concrete directory, where a
clone can be created in. The new name 'working copy' is used for a
concrete instance of such a directory, where a clone has been created in
for a repository stored in SCM-Manager. Such a working copy can be
cached and reused for further changes.
2020-06-02 21:31:43 +02:00
René Pfeuffer
e5f4ad72d6 Add test for git reclaim of workdir 2020-06-02 21:31:43 +02:00
René Pfeuffer
5b034f8d02 Introduce cache layer for workdirs 2020-06-02 21:31:43 +02:00
Eduard Heimbuch
97cac87563 merge with develop 2020-05-20 12:13:47 +02:00
René Pfeuffer
2b1ba7e4f3 Update servlet version 2020-05-19 16:29:40 +02:00
René Pfeuffer
c722565109 Hide getEffectedPaths for other packages 2020-05-19 09:56:24 +02:00
René Pfeuffer
35ffc5c4e2 Introduce new API for modifications
New modifications includes list of 'renames'. Therefore we introduce
a new base class Modification.
2020-05-19 09:56:24 +02:00
René Pfeuffer
4d352efef0 Remove wrong test
The GitHunkParser has nothing to do with renames, so this test does not
make any sense.
2020-05-19 09:56:24 +02:00
René Pfeuffer
fba34b3bab Add unit tests 2020-05-19 09:56:24 +02:00
René Pfeuffer
dbc58784e4 Fix path handling 2020-05-19 09:56:24 +02:00
René Pfeuffer
d5d9690389 Remove redundant constructor parameter
The repository can be retrieved from the context and does not have to be
passed through by every constructor
2020-05-12 15:45:58 +02:00
René Pfeuffer
52a09a96d2 Fix error with redundant line breaks
This fixes an error with a repository, where an added file has \r\r\n
as line breaks. This interesting combination is handled as a single
line break by the diff operation, while Java's Scanner implementation
handles this as two lines (the first one delimited by the first \r,
the second one delimited by \r\n. This led to empty lines inside the
diff, where we only expect lines that contain at least one character
(' ', '+' or '-'), and this in turn led to an index out of bounds
exception.

Now we handle each combination of any kind of new line delimiter
characters as a single delimiter. This should be safe, because, as
mentioned earlier, we always expect at least one character in a line
for a diff output.
2020-05-04 15:23:46 +02:00
Florian Scholdei
f1b34eb502 Changeover to MIT license (#1066)
* prepare license-maven-plugin for license migration
* added license mapping for tsx files and added some more excludes
* Changeover to MIT license
* Fix build problems
* Delete old remaining licenses
* Add more exclude path for license checker
* Rename included netbeans license, add exclude .m2/repository/
* Specify .m2 exclude because not only repository/, also wrapper/ must match
* Add .cache/ exclude for license check
* Modify formatting of license in java classes to comply with convention and IDE
* Add IntelliJ documentation for license configuration
* Update CHANGELOG.md
* Exclude tmp/workspace/ dir for license check
* Edit README.md

Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
2020-03-23 15:35:58 +01:00
René Pfeuffer
f5cfd0ca68 Adapt unit test to new mockito api 2020-03-20 11:44:28 +01:00
René Pfeuffer
55ef3f8c8c Merge remote-tracking branch 'origin/develop' into feature/browse_commit_with_limit
# Conflicts:
#	CHANGELOG.md
2020-03-10 09:43:31 +01:00
René Pfeuffer
2d117648ba Add possibility to set jgit nfs related config
It may be necessary for users to configure jgit behaviour related to
file handling. This commit makes the following two configurations
available (among others):

- core.trustfolderstat
- core.supportsatomicfilecreation
2020-03-09 16:44:42 +01:00
René Pfeuffer
b8ab729c45 Merge branch 'develop' into feature/browse_commit_with_limit 2020-03-09 08:40:29 +01:00
Rene Pfeuffer
cf43e3bc84 Implement new limit/offset rule for git and svn
Directories shall no longer be taken into account for limit/offset
calculations.
2020-03-03 17:06:55 +01:00
Rene Pfeuffer
e0b02ea1a3 Use api to set system config for lfs
Could be so simple if this works :-)
2020-03-03 16:13:17 +01:00
Rene Pfeuffer
fa80c83109 Implement new limit/offset rule for git
Directories shall no longer be taken into account for limit/offset
calculations.
2020-03-03 11:59:20 +01:00
Rene Pfeuffer
80bfc37d0f Merge with default 2020-03-03 09:35:01 +01:00