From 13417cf9c6eec555b51da49742e47939d2f5715b Mon Sep 17 00:00:00 2001 From: James Moger Date: Thu, 18 Oct 2012 17:32:28 -0400 Subject: Exclude submodules from zip downloads (issue 151) --- src/com/gitblit/utils/JGitUtils.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/com/gitblit/utils/JGitUtils.java b/src/com/gitblit/utils/JGitUtils.java index 231b935c..bc44f00f 100644 --- a/src/com/gitblit/utils/JGitUtils.java +++ b/src/com/gitblit/utils/JGitUtils.java @@ -1756,6 +1756,9 @@ public class JGitUtils { } 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)); -- cgit v1.2.3