| | |
| | | if (credentialsProvider != null) {
|
| | | clone.setCredentialsProvider(credentialsProvider);
|
| | | }
|
| | | clone.call();
|
| | | Repository repository = clone.call().getRepository();
|
| | | |
| | | // Now we have to fetch because CloneCommand doesn't fetch
|
| | | // refs/notes nor does it allow manual RefSpec.
|
| | | File gitDir = FileKey.resolve(new File(repositoriesFolder, name), FS.DETECTED);
|
| | | FileRepository repository = new FileRepository(gitDir);
|
| | | result.createdRepository = true;
|
| | | result.fetchResult = fetchRepository(credentialsProvider, repository);
|
| | | repository.close();
|
| | |
| | | }
|
| | | tw.setRecursive(true);
|
| | | while (tw.next()) {
|
| | | if (tw.getFileMode(0) == FileMode.GITLINK) {
|
| | | continue;
|
| | | }
|
| | | ZipEntry entry = new ZipEntry(tw.getPathString());
|
| | | entry.setSize(tw.getObjectReader().getObjectSize(tw.getObjectId(0),
|
| | | Constants.OBJ_BLOB));
|