summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2012-10-18 17:32:28 -0400
committerJames Moger <james.moger@gitblit.com>2012-10-19 22:47:33 -0400
commit13417cf9c6eec555b51da49742e47939d2f5715b (patch)
tree998d9024be0f778ea057c35fc7c0c9dda6986917 /src
parentb0e164283fee6f993589cce849ba1fc7d294e89d (diff)
downloadgitblit-13417cf9c6eec555b51da49742e47939d2f5715b.tar.gz
gitblit-13417cf9c6eec555b51da49742e47939d2f5715b.zip
Exclude submodules from zip downloads (issue 151)
Diffstat (limited to 'src')
-rw-r--r--src/com/gitblit/utils/JGitUtils.java3
1 files changed, 3 insertions, 0 deletions
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));