Skip to content

Commit

Permalink
Merge pull request #4 from nanoant/patch/fix-submodule-info
Browse files Browse the repository at this point in the history
Fix submodule info loading
  • Loading branch information
unknwon committed Jan 14, 2016
2 parents 081966e + 919a66d commit 1193908
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ func (c *Commit) GetSubModules() (*objectCache, error) {
}

scanner := bufio.NewScanner(rd)
c.submoduleCache = newObjectCache()
var ismodule bool
var path string
for scanner.Scan() {
Expand Down
1 change: 0 additions & 1 deletion repo_commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ func (repo *Repository) GetTagCommitID(name string) (string, error) {
// \n\n separate headers from message
func parseCommitData(data []byte) (*Commit, error) {
commit := new(Commit)
commit.submoduleCache = newObjectCache()
commit.parents = make([]sha1, 0, 1)
// we now have the contents of the commit object. Let's investigate...
nextline := 0
Expand Down
2 changes: 1 addition & 1 deletion tree_entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func (tes Entries) GetCommitsInfo(commit *Commit, treePath string) ([][]interfac
go func(i int) {
cinfo := commitInfo{entryName: tes[i].Name()}
sm, err := commit.GetSubModule(path.Join(treePath, tes[i].Name()))
if err != nil {
if err != nil && !IsErrNotExist(err) {
cinfo.err = fmt.Errorf("GetSubModule (%s/%s): %v", treePath, tes[i].Name(), err)
revChan <- cinfo
return
Expand Down

0 comments on commit 1193908

Please sign in to comment.