]> source.dussan.org Git - gitblit.git/commitdiff
Exclude submodules from zip downloads (issue 151)
authorJames Moger <james.moger@gitblit.com>
Thu, 18 Oct 2012 21:32:28 +0000 (17:32 -0400)
committerJames Moger <james.moger@gitblit.com>
Sat, 20 Oct 2012 02:47:33 +0000 (22:47 -0400)
docs/04_releases.mkd
src/com/gitblit/utils/JGitUtils.java

index a26b2c8afc117aededc3bac0a5895fd4e84e3895..920ae386df9aebe61e32993804d164ccd271534b 100644 (file)
@@ -11,6 +11,7 @@ If you are updating from an earlier release AND you have indexed branches with t
 \r
 #### fixes\r
 \r
+- Exclude submodules from zip downloads (issue 151)\r
 - Fixed bug where repository ownership was not updated on rename user\r
 - Fixed bug in create/rename repository if you explicitly specified the alias for the root group (e.g. main/myrepo) (issue 143)\r
 - Wrapped Markdown parser with improved exception handler (issue 142)\r
index 231b935ceec8335973bca3c201d9c9bd84f90222..bc44f00f30c7337a387b0f0dba266278c05098ed 100644 (file)
@@ -1756,6 +1756,9 @@ public class JGitUtils {
                        }\r
                        tw.setRecursive(true);\r
                        while (tw.next()) {\r
+                               if (tw.getFileMode(0) == FileMode.GITLINK) {\r
+                                       continue;\r
+                               }\r
                                ZipEntry entry = new ZipEntry(tw.getPathString());\r
                                entry.setSize(tw.getObjectReader().getObjectSize(tw.getObjectId(0),\r
                                                Constants.OBJ_BLOB));\r