src-d / go-git

Project has been moved to: https://github.com/go-git/go-git
https://github.com/go-git/go-git
Apache License 2.0
4.9k stars 540 forks source link

MemoryIndex allows concurrent read #1168

Closed niukuo closed 5 years ago

niukuo commented 5 years ago

Signed-off-by: niukuo niukuo@gmail.com

add a lock in MemoryIndex for concurrent read

mcuadros commented 5 years ago

by design the library is not thread-safe. Thanks anyway

niukuo commented 5 years ago

by design the library is not thread-safe. Thanks anyway

https://github.com/src-d/go-git/issues/457#issuecomment-312815087

This pr didn't break any public api, so can you reconsider it?