{"action":"created","comment":{"url":"https://api.github.com/repos/libarchive/libarchive/pulls/comments/56773810","id":56773810,"diff_hunk":"@@ -828,7 +832,15 @@ _archive_read_data_block(struct archive *_a, const void **buff,\n \t\t}\n \t} else\n \t\tbytes = 0;\n-\tif (bytes == 0) {\n+\t/*\n+\t * Return an EOF unless we've read a leading empty sparse region, which\n+\t * is used to represent fully-sparse files.\n+\t *\n+\t * TODO: it is not technically necessary to check for entry_tota == 0,\n+\t * but this simplifies some unit tests that expect to only read data\n+\t * regions with length > 0. Consider fixing these tests (test_sparse_basic).\n+\t*/\n+\tif (bytes == 0 && !(empty_sparse_region && t->entry_total == 0)) {","path":"libarchive/archive_read_disk_posix.c","position":31,"original_position":31,"commit_id":"b3950dc412310765c78d2e2b42abd026550d561a","original_commit_id":"b3950dc412310765c78d2e2b42abd026550d561a","user":{"login":"flandr","id":1644146,"avatar_url":"https://avatars.githubusercontent.com/u/1644146?v=3","gravatar_id":"","url":"https://api.github.com/users/flandr","html_url":"https://github.com/flandr","followers_url":"https://api.github.com/users/flandr/followers","following_url":"https://api.github.com/users/flandr/following{/other_user}","gists_url":"https://api.github.com/users/flandr/gists{/gist_id}","starred_url":"https://api.github.com/users/flandr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flandr/subscriptions","organizations_url":"https://api.github.com/users/flandr/orgs","repos_url":"https://api.github.com/users/flandr/repos","events_url":"https://api.github.com/users/flandr/events{/privacy}","received_events_url":"https://api.github.com/users/flandr/received_events","type":"User","site_admin":false},"body":"Taking a look","created_at":"2016-03-20T22:36:02Z","updated_at":"2016-03-20T22:36:02Z","html_url":"https://github.com/libarchive/libarchive/pull/655#discussion_r56773810","pull_request_url":"https://api.github.com/repos/libarchive/libarchive/pulls/655","_links":{"self":{"href":"https://api.github.com/repos/libarchive/libarchive/pulls/comments/56773810"},"html":{"href":"https://github.com/libarchive/libarchive/pull/655#discussion_r56773810"},"pull_request":{"href":"https://api.github.com/repos/libarchive/libarchive/pulls/655"}}},"pull_request":{"url":"https://api.github.com/repos/libarchive/libarchive/pulls/655","id":58507297,"html_url":"https://github.com/libarchive/libarchive/pull/655","diff_url":"https://github.com/libarchive/libarchive/pull/655.diff","patch_url":"https://github.com/libarchive/libarchive/pull/655.patch","issue_url":"https://api.github.com/repos/libarchive/libarchive/issues/655","number":655,"state":"open","locked":false,"title":"Support efficient creation of fully-sparse files","user":{"login":"flandr","id":1644146,"avatar_url":"https://avatars.githubusercontent.com/u/1644146?v=3","gravatar_id":"","url":"https://api.github.com/users/flandr","html_url":"https://github.com/flandr","followers_url":"https://api.github.com/users/flandr/followers","following_url":"https://api.github.com/users/flandr/following{/other_user}","gists_url":"https://api.github.com/users/flandr/gists{/gist_id}","starred_url":"https://api.github.com/users/flandr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flandr/subscriptions","organizations_url":"https://api.github.com/users/flandr/orgs","repos_url":"https://api.github.com/users/flandr/repos","events_url":"https://api.github.com/users/flandr/events{/privacy}","received_events_url":"https://api.github.com/users/flandr/received_events","type":"User","site_admin":false},"body":"Addresses the problem described in issue #654, detecting fully-sparse files and only emitting the sparse maps needed to recreate them. I have tested extraction of archives created this way with both bsdtar and GNU tar and they both handle the zero-length sparse \"data\" regions correctly.\r\n\r\nSome minor cleanups of the sparse file unit tests are included as separate commits.","created_at":"2016-02-06T01:45:09Z","updated_at":"2016-03-20T22:36:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0492aaab7ba60025e74c85a5851570471abcd3f3","assignee":null,"milestone":{"url":"https://api.github.com/repos/libarchive/libarchive/milestones/1","html_url":"https://github.com/libarchive/libarchive/milestones/3.2","labels_url":"https://api.github.com/repos/libarchive/libarchive/milestones/1/labels","id":1236195,"number":1,"title":"3.2","description":"If there is an issue you think should be added to this milestone, please:\r\n  * Retest that issue against the current github master.  Many things have been fixed since 3.1.2.\r\n  * Add a comment to the issue explaining your test results.\r\n  * Make sure the issue has enough details to reproduce it:  a sample input file, details of the platform, compiler, etc.\r\n\r\nIf you’d like to help fix it:\r\n  * Write a test.\r\n  * Submit a patch.  Patches without tests always take longer to evaluate.\r\n","creator":{"login":"kientzle","id":1398793,"avatar_url":"https://avatars.githubusercontent.com/u/1398793?v=3","gravatar_id":"","url":"https://api.github.com/users/kientzle","html_url":"https://github.com/kientzle","followers_url":"https://api.github.com/users/kientzle/followers","following_url":"https://api.github.com/users/kientzle/following{/other_user}","gists_url":"https://api.github.com/users/kientzle/gists{/gist_id}","starred_url":"https://api.github.com/users/kientzle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kientzle/subscriptions","organizations_url":"https://api.github.com/users/kientzle/orgs","repos_url":"https://api.github.com/users/kientzle/repos","events_url":"https://api.github.com/users/kientzle/events{/privacy}","received_events_url":"https://api.github.com/users/kientzle/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":9,"state":"open","created_at":"2015-08-01T15:22:50Z","updated_at":"2016-03-19T18:33:06Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/libarchive/libarchive/pulls/655/commits","review_comments_url":"https://api.github.com/repos/libarchive/libarchive/pulls/655/comments","review_comment_url":"https://api.github.com/repos/libarchive/libarchive/pulls/comments{/number}","comments_url":"https://api.github.com/repos/libarchive/libarchive/issues/655/comments","statuses_url":"https://api.github.com/repos/libarchive/libarchive/statuses/b3950dc412310765c78d2e2b42abd026550d561a","head":{"label":"flandr:fully-sparse","ref":"fully-sparse","sha":"b3950dc412310765c78d2e2b42abd026550d561a","user":{"login":"flandr","id":1644146,"avatar_url":"https://avatars.githubusercontent.com/u/1644146?v=3","gravatar_id":"","url":"https://api.github.com/users/flandr","html_url":"https://github.com/flandr","followers_url":"https://api.github.com/users/flandr/followers","following_url":"https://api.github.com/users/flandr/following{/other_user}","gists_url":"https://api.github.com/users/flandr/gists{/gist_id}","starred_url":"https://api.github.com/users/flandr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flandr/subscriptions","organizations_url":"https://api.github.com/users/flandr/orgs","repos_url":"https://api.github.com/users/flandr/repos","events_url":"https://api.github.com/users/flandr/events{/privacy}","received_events_url":"https://api.github.com/users/flandr/received_events","type":"User","site_admin":false},"repo":{"id":51184679,"name":"libarchive","full_name":"flandr/libarchive","owner":{"login":"flandr","id":1644146,"avatar_url":"https://avatars.githubusercontent.com/u/1644146?v=3","gravatar_id":"","url":"https://api.github.com/users/flandr","html_url":"https://github.com/flandr","followers_url":"https://api.github.com/users/flandr/followers","following_url":"https://api.github.com/users/flandr/following{/other_user}","gists_url":"https://api.github.com/users/flandr/gists{/gist_id}","starred_url":"https://api.github.com/users/flandr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flandr/subscriptions","organizations_url":"https://api.github.com/users/flandr/orgs","repos_url":"https://api.github.com/users/flandr/repos","events_url":"https://api.github.com/users/flandr/events{/privacy}","received_events_url":"https://api.github.com/users/flandr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/flandr/libarchive","description":"Multi-format archive and compression library","fork":true,"url":"https://api.github.com/repos/flandr/libarchive","forks_url":"https://api.github.com/repos/flandr/libarchive/forks","keys_url":"https://api.github.com/repos/flandr/libarchive/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flandr/libarchive/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flandr/libarchive/teams","hooks_url":"https://api.github.com/repos/flandr/libarchive/hooks","issue_events_url":"https://api.github.com/repos/flandr/libarchive/issues/events{/number}","events_url":"https://api.github.com/repos/flandr/libarchive/events","assignees_url":"https://api.github.com/repos/flandr/libarchive/assignees{/user}","branches_url":"https://api.github.com/repos/flandr/libarchive/branches{/branch}","tags_url":"https://api.github.com/repos/flandr/libarchive/tags","blobs_url":"https://api.github.com/repos/flandr/libarchive/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flandr/libarchive/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flandr/libarchive/git/refs{/sha}","trees_url":"https://api.github.com/repos/flandr/libarchive/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flandr/libarchive/statuses/{sha}","languages_url":"https://api.github.com/repos/flandr/libarchive/languages","stargazers_url":"https://api.github.com/repos/flandr/libarchive/stargazers","contributors_url":"https://api.github.com/repos/flandr/libarchive/contributors","subscribers_url":"https://api.github.com/repos/flandr/libarchive/subscribers","subscription_url":"https://api.github.com/repos/flandr/libarchive/subscription","commits_url":"https://api.github.com/repos/flandr/libarchive/commits{/sha}","git_commits_url":"https://api.github.com/repos/flandr/libarchive/git/commits{/sha}","comments_url":"https://api.github.com/repos/flandr/libarchive/comments{/number}","issue_comment_url":"https://api.github.com/repos/flandr/libarchive/issues/comments{/number}","contents_url":"https://api.github.com/repos/flandr/libarchive/contents/{+path}","compare_url":"https://api.github.com/repos/flandr/libarchive/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flandr/libarchive/merges","archive_url":"https://api.github.com/repos/flandr/libarchive/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flandr/libarchive/downloads","issues_url":"https://api.github.com/repos/flandr/libarchive/issues{/number}","pulls_url":"https://api.github.com/repos/flandr/libarchive/pulls{/number}","milestones_url":"https://api.github.com/repos/flandr/libarchive/milestones{/number}","notifications_url":"https://api.github.com/repos/flandr/libarchive/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flandr/libarchive/labels{/name}","releases_url":"https://api.github.com/repos/flandr/libarchive/releases{/id}","deployments_url":"https://api.github.com/repos/flandr/libarchive/deployments","created_at":"2016-02-06T01:36:11Z","updated_at":"2016-02-06T01:36:17Z","pushed_at":"2016-02-18T00:03:08Z","git_url":"git://github.com/flandr/libarchive.git","ssh_url":"git@github.com:flandr/libarchive.git","clone_url":"https://github.com/flandr/libarchive.git","svn_url":"https://github.com/flandr/libarchive","homepage":"http://www.libarchive.org","size":25072,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"libarchive:master","ref":"master","sha":"8c40464c642fbabe979e972013965fe3d47472dd","user":{"login":"libarchive","id":1354741,"avatar_url":"https://avatars.githubusercontent.com/u/1354741?v=3","gravatar_id":"","url":"https://api.github.com/users/libarchive","html_url":"https://github.com/libarchive","followers_url":"https://api.github.com/users/libarchive/followers","following_url":"https://api.github.com/users/libarchive/following{/other_user}","gists_url":"https://api.github.com/users/libarchive/gists{/gist_id}","starred_url":"https://api.github.com/users/libarchive/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libarchive/subscriptions","organizations_url":"https://api.github.com/users/libarchive/orgs","repos_url":"https://api.github.com/users/libarchive/repos","events_url":"https://api.github.com/users/libarchive/events{/privacy}","received_events_url":"https://api.github.com/users/libarchive/received_events","type":"Organization","site_admin":false},"repo":{"id":3219804,"name":"libarchive","full_name":"libarchive/libarchive","owner":{"login":"libarchive","id":1354741,"avatar_url":"https://avatars.githubusercontent.com/u/1354741?v=3","gravatar_id":"","url":"https://api.github.com/users/libarchive","html_url":"https://github.com/libarchive","followers_url":"https://api.github.com/users/libarchive/followers","following_url":"https://api.github.com/users/libarchive/following{/other_user}","gists_url":"https://api.github.com/users/libarchive/gists{/gist_id}","starred_url":"https://api.github.com/users/libarchive/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libarchive/subscriptions","organizations_url":"https://api.github.com/users/libarchive/orgs","repos_url":"https://api.github.com/users/libarchive/repos","events_url":"https://api.github.com/users/libarchive/events{/privacy}","received_events_url":"https://api.github.com/users/libarchive/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/libarchive/libarchive","description":"Multi-format archive and compression library","fork":false,"url":"https://api.github.com/repos/libarchive/libarchive","forks_url":"https://api.github.com/repos/libarchive/libarchive/forks","keys_url":"https://api.github.com/repos/libarchive/libarchive/keys{/key_id}","collaborators_url":"https://api.github.com/repos/libarchive/libarchive/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/libarchive/libarchive/teams","hooks_url":"https://api.github.com/repos/libarchive/libarchive/hooks","issue_events_url":"https://api.github.com/repos/libarchive/libarchive/issues/events{/number}","events_url":"https://api.github.com/repos/libarchive/libarchive/events","assignees_url":"https://api.github.com/repos/libarchive/libarchive/assignees{/user}","branches_url":"https://api.github.com/repos/libarchive/libarchive/branches{/branch}","tags_url":"https://api.github.com/repos/libarchive/libarchive/tags","blobs_url":"https://api.github.com/repos/libarchive/libarchive/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/libarchive/libarchive/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/libarchive/libarchive/git/refs{/sha}","trees_url":"https://api.github.com/repos/libarchive/libarchive/git/trees{/sha}","statuses_url":"https://api.github.com/repos/libarchive/libarchive/statuses/{sha}","languages_url":"https://api.github.com/repos/libarchive/libarchive/languages","stargazers_url":"https://api.github.com/repos/libarchive/libarchive/stargazers","contributors_url":"https://api.github.com/repos/libarchive/libarchive/contributors","subscribers_url":"https://api.github.com/repos/libarchive/libarchive/subscribers","subscription_url":"https://api.github.com/repos/libarchive/libarchive/subscription","commits_url":"https://api.github.com/repos/libarchive/libarchive/commits{/sha}","git_commits_url":"https://api.github.com/repos/libarchive/libarchive/git/commits{/sha}","comments_url":"https://api.github.com/repos/libarchive/libarchive/comments{/number}","issue_comment_url":"https://api.github.com/repos/libarchive/libarchive/issues/comments{/number}","contents_url":"https://api.github.com/repos/libarchive/libarchive/contents/{+path}","compare_url":"https://api.github.com/repos/libarchive/libarchive/compare/{base}...{head}","merges_url":"https://api.github.com/repos/libarchive/libarchive/merges","archive_url":"https://api.github.com/repos/libarchive/libarchive/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/libarchive/libarchive/downloads","issues_url":"https://api.github.com/repos/libarchive/libarchive/issues{/number}","pulls_url":"https://api.github.com/repos/libarchive/libarchive/pulls{/number}","milestones_url":"https://api.github.com/repos/libarchive/libarchive/milestones{/number}","notifications_url":"https://api.github.com/repos/libarchive/libarchive/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/libarchive/libarchive/labels{/name}","releases_url":"https://api.github.com/repos/libarchive/libarchive/releases{/id}","deployments_url":"https://api.github.com/repos/libarchive/libarchive/deployments","created_at":"2012-01-19T18:16:02Z","updated_at":"2016-03-17T16:26:09Z","pushed_at":"2016-03-19T18:28:00Z","git_url":"git://github.com/libarchive/libarchive.git","ssh_url":"git@github.com:libarchive/libarchive.git","clone_url":"https://github.com/libarchive/libarchive.git","svn_url":"https://github.com/libarchive/libarchive","homepage":"http://www.libarchive.org","size":25574,"stargazers_count":455,"watchers_count":455,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":176,"mirror_url":null,"open_issues_count":137,"forks":176,"open_issues":137,"watchers":455,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/libarchive/libarchive/pulls/655"},"html":{"href":"https://github.com/libarchive/libarchive/pull/655"},"issue":{"href":"https://api.github.com/repos/libarchive/libarchive/issues/655"},"comments":{"href":"https://api.github.com/repos/libarchive/libarchive/issues/655/comments"},"review_comments":{"href":"https://api.github.com/repos/libarchive/libarchive/pulls/655/comments"},"review_comment":{"href":"https://api.github.com/repos/libarchive/libarchive/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/libarchive/libarchive/pulls/655/commits"},"statuses":{"href":"https://api.github.com/repos/libarchive/libarchive/statuses/b3950dc412310765c78d2e2b42abd026550d561a"}}}}