From: James Moger Date: Thu, 18 Oct 2012 21:32:28 +0000 (-0400) Subject: Exclude submodules from zip downloads (issue 151) X-Git-Tag: v1.2.0~153 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=13417cf9c6eec555b51da49742e47939d2f5715b;p=gitblit.git Exclude submodules from zip downloads (issue 151) --- diff --git a/docs/04_releases.mkd b/docs/04_releases.mkd index a26b2c8a..920ae386 100644 --- a/docs/04_releases.mkd +++ b/docs/04_releases.mkd @@ -11,6 +11,7 @@ If you are updating from an earlier release AND you have indexed branches with t #### fixes +- Exclude submodules from zip downloads (issue 151) - Fixed bug where repository ownership was not updated on rename user - Fixed bug in create/rename repository if you explicitly specified the alias for the root group (e.g. main/myrepo) (issue 143) - Wrapped Markdown parser with improved exception handler (issue 142) 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));