diff options
author | Alberto Cortés <alberto@sourced.tech> | 2016-01-21 03:00:41 +0100 |
---|---|---|
committer | Alberto Cortés <alberto@sourced.tech> | 2016-01-21 03:00:41 +0100 |
commit | 07e4c4368921f73048578f22a14a1c671ec3ba46 (patch) | |
tree | 3aad7ae994a71880f8f1e900dcb60ea15d702d04 /repository.go | |
parent | 37cc5cf842c3c0fb989bcf7525cc8f826d96b295 (diff) | |
download | go-git-07e4c4368921f73048578f22a14a1c671ec3ba46.tar.gz |
Fix commit.File() gorutine leak
Commit.File() was leaking a goroutine because it was looping over
an iterator without closing its channel.
Now commit.File() calls the new Tree.File() method that searches
the file in the repository by trasversing the dir tree instead
of using the tree.Files() iterator.
This not only prevent the goroutine leak, but also speeds up
file searching.
Diffstat (limited to 'repository.go')
0 files changed, 0 insertions, 0 deletions