diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java index 1f979a938..87c95ec83 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java @@ -318,7 +318,9 @@ private FetchResult fetch(Repository clonedRepo, URIish u) if (depth != null) { command.setDepth(depth.intValue()); } - command.setShallowSince(shallowSince); + if (shallowSince != null) { + command.setShallowSince(shallowSince); + } command.setShallowExcludes(shallowExcludes); configure(command); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java index 84bee3620..e7a8be043 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java @@ -227,7 +227,9 @@ public FetchResult call() throws GitAPIException, InvalidRemoteException, } transport.setDepth(Constants.INFINITE_DEPTH); } - transport.setDeepenSince(deepenSince); + if (deepenSince != null) { + transport.setDeepenSince(deepenSince); + } transport.setDeepenNots(shallowExcludes); configure(transport); FetchResult result = transport.fetch(monitor,