Skip to content

Commit 1193908

Browse files
committed
Merge pull request #4 from nanoant/patch/fix-submodule-info
Fix submodule info loading
2 parents 081966e + 919a66d commit 1193908

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

commit.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ func (c *Commit) GetSubModules() (*objectCache, error) {
195195
}
196196

197197
scanner := bufio.NewScanner(rd)
198+
c.submoduleCache = newObjectCache()
198199
var ismodule bool
199200
var path string
200201
for scanner.Scan() {

repo_commit.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ func (repo *Repository) GetTagCommitID(name string) (string, error) {
3636
// \n\n separate headers from message
3737
func parseCommitData(data []byte) (*Commit, error) {
3838
commit := new(Commit)
39-
commit.submoduleCache = newObjectCache()
4039
commit.parents = make([]sha1, 0, 1)
4140
// we now have the contents of the commit object. Let's investigate...
4241
nextline := 0

tree_entry.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ func (tes Entries) GetCommitsInfo(commit *Commit, treePath string) ([][]interfac
144144
go func(i int) {
145145
cinfo := commitInfo{entryName: tes[i].Name()}
146146
sm, err := commit.GetSubModule(path.Join(treePath, tes[i].Name()))
147-
if err != nil {
147+
if err != nil && !IsErrNotExist(err) {
148148
cinfo.err = fmt.Errorf("GetSubModule (%s/%s): %v", treePath, tes[i].Name(), err)
149149
revChan <- cinfo
150150
return

0 commit comments

Comments
 (0)