@Override
public void copy(final Path source, final Path target, final CopyOption... options)
throws UnsupportedOperationException, FileAlreadyExistsException, DirectoryNotEmptyException, IOException, SecurityException {
checkNotNull("source", source);
checkNotNull("target", target);
final JGitPathImpl gSource = toPathImpl(source);
final JGitPathImpl gTarget = toPathImpl(target);
final boolean isSourceBranch = isBranch(gSource);
final boolean isTargetBranch = isBranch(gTarget);
if (isSourceBranch && isTargetBranch) {
copyBranch(gSource, gTarget);
return;
}
copyAsset(gSource, gTarget);
}