diff options
author | James Moger <james.moger@gitblit.com> | 2012-10-18 17:32:28 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2012-10-19 22:47:33 -0400 |
commit | 13417cf9c6eec555b51da49742e47939d2f5715b (patch) | |
tree | 998d9024be0f778ea057c35fc7c0c9dda6986917 /src | |
parent | b0e164283fee6f993589cce849ba1fc7d294e89d (diff) | |
download | gitblit-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.java | 3 |
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));
|