aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/revlist/revlist.go
diff options
context:
space:
mode:
authorAntonio Jesus Navarro Perez <antnavper@gmail.com>2017-06-19 12:52:03 +0200
committerAntonio Jesus Navarro Perez <antnavper@gmail.com>2017-06-19 12:52:03 +0200
commit9d4773cbae0c2ae9b6931c5a6bbac3da8d074ac7 (patch)
treea6205c07fcf5d2c6f50ceeaf0898bda9e58983bb /plumbing/revlist/revlist.go
parentad7432333d5859352ca67864815c4e5037fcd4eb (diff)
downloadgo-git-9d4773cbae0c2ae9b6931c5a6bbac3da8d074ac7.tar.gz
revlist: ignore treeEntries that are submodules.
- If we don't ignore submodules in trees, when we tried to perform a push, revlist.Objects returned hashes that was from submodules, causing an "object not found" error in packfile generation.
Diffstat (limited to 'plumbing/revlist/revlist.go')
-rw-r--r--plumbing/revlist/revlist.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/plumbing/revlist/revlist.go b/plumbing/revlist/revlist.go
index 3e02184..20bc99d 100644
--- a/plumbing/revlist/revlist.go
+++ b/plumbing/revlist/revlist.go
@@ -7,6 +7,7 @@ import (
"io"
"gopkg.in/src-d/go-git.v4/plumbing"
+ "gopkg.in/src-d/go-git.v4/plumbing/filemode"
"gopkg.in/src-d/go-git.v4/plumbing/object"
"gopkg.in/src-d/go-git.v4/plumbing/storer"
)
@@ -121,6 +122,10 @@ func iterateCommitTrees(
return err
}
+ if e.Mode == filemode.Submodule {
+ continue
+ }
+
if seen[e.Hash] {
continue
}