git-lfs/lfs
brian m. carlson 35e69a2d44
lfs: avoid deadlock when object scanner returns early
When we encounter an end of file in the object scanner, we can return
false from the Scan method.  In such a case, if there are a sufficient
number of blobs left to be handled, the goroutine that produces them
will fill the channel it uses to send them to us, and since it is not
done, it will close neither the blob channel nor the error channel.

However, when we exit the loop early, we still attempt to wait for the
error channel to close, which means we deadlock.  If we return early,
skip the attempt to read from the error channel and simply assume no
error has occurred.
2018-11-16 14:38:52 +00:00
..
attribute.go lfs/attribute.go: remove default value from upgradeables 2018-05-04 09:09:03 -07:00
config_test.go move config.FetchPruneConfig -> lfs.FetchPruneConfig 2017-10-18 13:51:57 -06:00
config.go move config.FetchPruneConfig -> lfs.FetchPruneConfig 2017-10-18 13:51:57 -06:00
diff_index_scanner.go move git diff-index invocation to git package using gitBuffered 2017-08-22 19:34:29 +02:00
extension.go lfs: honor umask when writing LFS file storage 2018-10-09 15:11:17 +00:00
gitfilter_clean.go lfs: honor umask when writing LFS file storage 2018-10-09 15:11:17 +00:00
gitfilter_smudge.go lfs/gitfilter_smudge.go: write-over locked files 2018-07-09 14:22:20 -05:00
gitfilter.go lfs,git: send refspec in batch api calls from smudge filter 2018-01-05 15:01:29 -07:00
gitscanner_catfilebatch.go lfs: PointerScanner is nil after error, so don't close 2017-10-27 14:26:02 -06:00
gitscanner_catfilebatchcheck.go move git cat-file invocation to git package using gitNoLFSBuffered 2017-08-22 19:34:29 +02:00
gitscanner_catfilebatchcheckscanner_test.go lfs: teach gitscanner how to emit lockable files that aren't lfs objects 2017-02-16 16:52:40 -07:00
gitscanner_index.go lfs/gitscanner: support gitscanner.Filter in more places 2018-01-31 18:16:28 -08:00
gitscanner_log.go Tidy files with Go 1.11's gofmt 2018-08-31 16:59:40 +00:00
gitscanner_pointerscanner_test.go git: replace object scanner with one based on gitobj 2018-09-11 18:43:27 +00:00
gitscanner_refs.go commands: use gitscanner for export 2018-07-03 11:13:25 -07:00
gitscanner_remotes.go extracts skipped ref calculation 2016-11-16 16:05:03 -07:00
gitscanner_tree.go lfs: avoid deadlock when object scanner returns early 2018-11-16 14:38:52 +00:00
gitscanner.go commands: use gitscanner for export 2018-07-03 11:13:25 -07:00
hook.go remove some more global config vars 2017-10-18 18:27:37 -06:00
lfs_test.go t: move testutils.go to cmd sub-package 2018-07-13 12:54:18 -05:00
lfs.go tq: enable transfer debugging when GIT_CURL_VERBOSE is set 2018-10-24 20:56:52 +00:00
pointer_test.go commands,lfs: teach lfs.DecodeFrom to return an io.Reader 2016-12-23 12:16:57 -07:00
pointer.go lfs: remove static lfs pointer clean/smudge funcs 2017-10-24 12:07:53 -06:00
scanner_git_test.go t: move testutils.go to cmd sub-package 2018-07-13 12:54:18 -05:00
scanner_test.go extract a filepathfilter package 2016-11-21 11:38:39 -07:00
scanner.go lfs: teach gitscanner how to emit lockable files that aren't lfs objects 2017-02-16 16:52:40 -07:00
util_generic.go Fix non linux with cgo build condition 2016-01-30 00:58:55 +03:00
util_test.go progress,tools: move CopyCallback (and related) to 'tools' 2017-11-22 14:08:33 -08:00
util.go lfs: honor umask when writing LFS file storage 2018-10-09 15:11:17 +00:00