Skip to content

Commit

Permalink
feat: team: shallow clone team project (omegat-org#774)
Browse files Browse the repository at this point in the history
* feat: team: shallow clone team project

Implement RFE#1720

Signed-off-by: Hiroshi Miura <[email protected]>

* docs: update changes.txt

Signed-off-by: Hiroshi Miura <[email protected]>

* wip: make it final

Signed-off-by: Hiroshi Miura <[email protected]>

---------

Signed-off-by: Hiroshi Miura <[email protected]>
  • Loading branch information
miurahr authored Oct 19, 2023
1 parent 9f28fd9 commit 6ced003
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions release/changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

Implemented requests:

- Download team project with a shallow history
https://sourceforge.net/p/omegat/feature-requests/1720/

- ResourceBundle Filter: default not to escape Unicode character
https://sourceforge.net/p/omegat/feature-requests/1716/

Expand Down
2 changes: 2 additions & 0 deletions src/org/omegat/core/team2/impl/GITRemoteRepository2.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ public class GITRemoteRepository2 implements IRemoteRepository2 {

// allow override timeout.
protected static final int TIMEOUT = 30; // seconds
protected static final int CLONE_DEPTH = 1; // clone depth

String repositoryURL;
String branch;
Expand Down Expand Up @@ -189,6 +190,7 @@ public void init(RepositoryDefinition repo, File dir, ProjectTeamSettings teamSe
c.setURI(repositoryURL);
c.setDirectory(localDirectory);
c.setTimeout(TIMEOUT);
c.setDepth(CLONE_DEPTH);
try {
c.call();
} catch (InvalidRemoteException e) {
Expand Down

0 comments on commit 6ced003

Please sign in to comment.