mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-12-22 16:29:51 +01:00
Accept git change type 'copy', too
This one was not expected to exist, though praxis proves otherwise. So we simply accept this one here, too.
This commit is contained in:
@@ -33,6 +33,7 @@ import org.eclipse.jgit.revwalk.RevWalk;
|
||||
import org.eclipse.jgit.treewalk.EmptyTreeIterator;
|
||||
import org.eclipse.jgit.treewalk.TreeWalk;
|
||||
import sonia.scm.repository.Added;
|
||||
import sonia.scm.repository.Copied;
|
||||
import sonia.scm.repository.GitUtil;
|
||||
import sonia.scm.repository.InternalRepositoryException;
|
||||
import sonia.scm.repository.Modification;
|
||||
@@ -130,6 +131,8 @@ public class GitModificationsCommand extends AbstractGitCommand implements Modif
|
||||
return new Removed(entry.getOldPath());
|
||||
case RENAME:
|
||||
return new Renamed(entry.getOldPath(), entry.getNewPath());
|
||||
case COPY:
|
||||
return new Copied(entry.getOldPath(), entry.getNewPath());
|
||||
default:
|
||||
throw new UnsupportedModificationTypeException(entity(repository), MessageFormat.format("The modification type: {0} is not supported.", type));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user