{"action":"created","comment":{"url":"https://api.github.com/repos/cvmfs/cvmfs/pulls/comments/46556251","id":46556251,"diff_hunk":"@@ -0,0 +1,249 @@\n+/**\n+ * This file is part of the CernVM File System.\n+ *\n+ * Process a set of input files and create appropriate graft files.\n+ */\n+\n+#include <fcntl.h>\n+#include <unistd.h>\n+#include <sys/stat.h>\n+\n+#include <cstdio>\n+#include <iostream>\n+#include <vector>\n+#include <sstream>\n+\n+#include \"compression.h\"\n+#include \"fs_traversal.h\"\n+#include \"hash.h\"\n+\n+#include \"swissknife_graft.h\"\n+\n+#define CHUNK_SIZE 16*1024\n+\n+int swissknife::CommandGraft::ChecksumFd(int fd, shash::Any &id, off_t &processed_size) {  // NOLINT","path":"cvmfs/swissknife_graft.cc","position":24,"original_position":24,"commit_id":"9ff1dcfd2376ed6147279d2d9d3814a57b2984d2","original_commit_id":"9ff1dcfd2376ed6147279d2d9d3814a57b2984d2","user":{"login":"bbockelm","id":1093447,"avatar_url":"https://avatars.githubusercontent.com/u/1093447?v=3","gravatar_id":"","url":"https://api.github.com/users/bbockelm","html_url":"https://github.com/bbockelm","followers_url":"https://api.github.com/users/bbockelm/followers","following_url":"https://api.github.com/users/bbockelm/following{/other_user}","gists_url":"https://api.github.com/users/bbockelm/gists{/gist_id}","starred_url":"https://api.github.com/users/bbockelm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbockelm/subscriptions","organizations_url":"https://api.github.com/users/bbockelm/orgs","repos_url":"https://api.github.com/users/bbockelm/repos","events_url":"https://api.github.com/users/bbockelm/events{/privacy}","received_events_url":"https://api.github.com/users/bbockelm/received_events","type":"User","site_admin":false},"body":"Yeah, we can move this with some small tweaks to `CompressFd2Null()`","created_at":"2015-12-03T14:25:54Z","updated_at":"2015-12-03T14:25:54Z","html_url":"https://github.com/cvmfs/cvmfs/pull/1232#discussion_r46556251","pull_request_url":"https://api.github.com/repos/cvmfs/cvmfs/pulls/1232","_links":{"self":{"href":"https://api.github.com/repos/cvmfs/cvmfs/pulls/comments/46556251"},"html":{"href":"https://github.com/cvmfs/cvmfs/pull/1232#discussion_r46556251"},"pull_request":{"href":"https://api.github.com/repos/cvmfs/cvmfs/pulls/1232"}}},"pull_request":{"url":"https://api.github.com/repos/cvmfs/cvmfs/pulls/1232","id":50080073,"html_url":"https://github.com/cvmfs/cvmfs/pull/1232","diff_url":"https://github.com/cvmfs/cvmfs/pull/1232.diff","patch_url":"https://github.com/cvmfs/cvmfs/pull/1232.patch","issue_url":"https://api.github.com/repos/cvmfs/cvmfs/issues/1232","number":1232,"state":"open","locked":false,"title":"Provide tool to create grafts","user":{"login":"bbockelm","id":1093447,"avatar_url":"https://avatars.githubusercontent.com/u/1093447?v=3","gravatar_id":"","url":"https://api.github.com/users/bbockelm","html_url":"https://github.com/bbockelm","followers_url":"https://api.github.com/users/bbockelm/followers","following_url":"https://api.github.com/users/bbockelm/following{/other_user}","gists_url":"https://api.github.com/users/bbockelm/gists{/gist_id}","starred_url":"https://api.github.com/users/bbockelm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbockelm/subscriptions","organizations_url":"https://api.github.com/users/bbockelm/orgs","repos_url":"https://api.github.com/users/bbockelm/repos","events_url":"https://api.github.com/users/bbockelm/events{/privacy}","received_events_url":"https://api.github.com/users/bbockelm/received_events","type":"User","site_admin":false},"body":"This provides `cvmfs_swissknife graft`, a simple tool for calculating graft files.","created_at":"2015-11-09T02:54:15Z","updated_at":"2015-12-03T14:25:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5ced050c7b89f2795761dee2cdd0b1f0923ed45f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cvmfs/cvmfs/pulls/1232/commits","review_comments_url":"https://api.github.com/repos/cvmfs/cvmfs/pulls/1232/comments","review_comment_url":"https://api.github.com/repos/cvmfs/cvmfs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cvmfs/cvmfs/issues/1232/comments","statuses_url":"https://api.github.com/repos/cvmfs/cvmfs/statuses/9ff1dcfd2376ed6147279d2d9d3814a57b2984d2","head":{"label":"bbockelm:create_graft","ref":"create_graft","sha":"9ff1dcfd2376ed6147279d2d9d3814a57b2984d2","user":{"login":"bbockelm","id":1093447,"avatar_url":"https://avatars.githubusercontent.com/u/1093447?v=3","gravatar_id":"","url":"https://api.github.com/users/bbockelm","html_url":"https://github.com/bbockelm","followers_url":"https://api.github.com/users/bbockelm/followers","following_url":"https://api.github.com/users/bbockelm/following{/other_user}","gists_url":"https://api.github.com/users/bbockelm/gists{/gist_id}","starred_url":"https://api.github.com/users/bbockelm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbockelm/subscriptions","organizations_url":"https://api.github.com/users/bbockelm/orgs","repos_url":"https://api.github.com/users/bbockelm/repos","events_url":"https://api.github.com/users/bbockelm/events{/privacy}","received_events_url":"https://api.github.com/users/bbockelm/received_events","type":"User","site_admin":false},"repo":{"id":11242442,"name":"cvmfs","full_name":"bbockelm/cvmfs","owner":{"login":"bbockelm","id":1093447,"avatar_url":"https://avatars.githubusercontent.com/u/1093447?v=3","gravatar_id":"","url":"https://api.github.com/users/bbockelm","html_url":"https://github.com/bbockelm","followers_url":"https://api.github.com/users/bbockelm/followers","following_url":"https://api.github.com/users/bbockelm/following{/other_user}","gists_url":"https://api.github.com/users/bbockelm/gists{/gist_id}","starred_url":"https://api.github.com/users/bbockelm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbockelm/subscriptions","organizations_url":"https://api.github.com/users/bbockelm/orgs","repos_url":"https://api.github.com/users/bbockelm/repos","events_url":"https://api.github.com/users/bbockelm/events{/privacy}","received_events_url":"https://api.github.com/users/bbockelm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bbockelm/cvmfs","description":"The CernVM File System","fork":true,"url":"https://api.github.com/repos/bbockelm/cvmfs","forks_url":"https://api.github.com/repos/bbockelm/cvmfs/forks","keys_url":"https://api.github.com/repos/bbockelm/cvmfs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bbockelm/cvmfs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bbockelm/cvmfs/teams","hooks_url":"https://api.github.com/repos/bbockelm/cvmfs/hooks","issue_events_url":"https://api.github.com/repos/bbockelm/cvmfs/issues/events{/number}","events_url":"https://api.github.com/repos/bbockelm/cvmfs/events","assignees_url":"https://api.github.com/repos/bbockelm/cvmfs/assignees{/user}","branches_url":"https://api.github.com/repos/bbockelm/cvmfs/branches{/branch}","tags_url":"https://api.github.com/repos/bbockelm/cvmfs/tags","blobs_url":"https://api.github.com/repos/bbockelm/cvmfs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bbockelm/cvmfs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bbockelm/cvmfs/git/refs{/sha}","trees_url":"https://api.github.com/repos/bbockelm/cvmfs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bbockelm/cvmfs/statuses/{sha}","languages_url":"https://api.github.com/repos/bbockelm/cvmfs/languages","stargazers_url":"https://api.github.com/repos/bbockelm/cvmfs/stargazers","contributors_url":"https://api.github.com/repos/bbockelm/cvmfs/contributors","subscribers_url":"https://api.github.com/repos/bbockelm/cvmfs/subscribers","subscription_url":"https://api.github.com/repos/bbockelm/cvmfs/subscription","commits_url":"https://api.github.com/repos/bbockelm/cvmfs/commits{/sha}","git_commits_url":"https://api.github.com/repos/bbockelm/cvmfs/git/commits{/sha}","comments_url":"https://api.github.com/repos/bbockelm/cvmfs/comments{/number}","issue_comment_url":"https://api.github.com/repos/bbockelm/cvmfs/issues/comments{/number}","contents_url":"https://api.github.com/repos/bbockelm/cvmfs/contents/{+path}","compare_url":"https://api.github.com/repos/bbockelm/cvmfs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bbockelm/cvmfs/merges","archive_url":"https://api.github.com/repos/bbockelm/cvmfs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bbockelm/cvmfs/downloads","issues_url":"https://api.github.com/repos/bbockelm/cvmfs/issues{/number}","pulls_url":"https://api.github.com/repos/bbockelm/cvmfs/pulls{/number}","milestones_url":"https://api.github.com/repos/bbockelm/cvmfs/milestones{/number}","notifications_url":"https://api.github.com/repos/bbockelm/cvmfs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bbockelm/cvmfs/labels{/name}","releases_url":"https://api.github.com/repos/bbockelm/cvmfs/releases{/id}","created_at":"2013-07-08T00:13:51Z","updated_at":"2014-01-02T14:02:52Z","pushed_at":"2015-11-09T02:30:27Z","git_url":"git://github.com/bbockelm/cvmfs.git","ssh_url":"git@github.com:bbockelm/cvmfs.git","clone_url":"https://github.com/bbockelm/cvmfs.git","svn_url":"https://github.com/bbockelm/cvmfs","homepage":"http://cernvm.cern.ch/portal/filesystem","size":90860,"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":"cvmfs:devel","ref":"devel","sha":"4cbb5b8ebf92b402475200ccaf3b8e3b7b31af7b","user":{"login":"cvmfs","id":1560859,"avatar_url":"https://avatars.githubusercontent.com/u/1560859?v=3","gravatar_id":"","url":"https://api.github.com/users/cvmfs","html_url":"https://github.com/cvmfs","followers_url":"https://api.github.com/users/cvmfs/followers","following_url":"https://api.github.com/users/cvmfs/following{/other_user}","gists_url":"https://api.github.com/users/cvmfs/gists{/gist_id}","starred_url":"https://api.github.com/users/cvmfs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cvmfs/subscriptions","organizations_url":"https://api.github.com/users/cvmfs/orgs","repos_url":"https://api.github.com/users/cvmfs/repos","events_url":"https://api.github.com/users/cvmfs/events{/privacy}","received_events_url":"https://api.github.com/users/cvmfs/received_events","type":"Organization","site_admin":false},"repo":{"id":3784908,"name":"cvmfs","full_name":"cvmfs/cvmfs","owner":{"login":"cvmfs","id":1560859,"avatar_url":"https://avatars.githubusercontent.com/u/1560859?v=3","gravatar_id":"","url":"https://api.github.com/users/cvmfs","html_url":"https://github.com/cvmfs","followers_url":"https://api.github.com/users/cvmfs/followers","following_url":"https://api.github.com/users/cvmfs/following{/other_user}","gists_url":"https://api.github.com/users/cvmfs/gists{/gist_id}","starred_url":"https://api.github.com/users/cvmfs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cvmfs/subscriptions","organizations_url":"https://api.github.com/users/cvmfs/orgs","repos_url":"https://api.github.com/users/cvmfs/repos","events_url":"https://api.github.com/users/cvmfs/events{/privacy}","received_events_url":"https://api.github.com/users/cvmfs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cvmfs/cvmfs","description":"The CernVM File System","fork":false,"url":"https://api.github.com/repos/cvmfs/cvmfs","forks_url":"https://api.github.com/repos/cvmfs/cvmfs/forks","keys_url":"https://api.github.com/repos/cvmfs/cvmfs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cvmfs/cvmfs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cvmfs/cvmfs/teams","hooks_url":"https://api.github.com/repos/cvmfs/cvmfs/hooks","issue_events_url":"https://api.github.com/repos/cvmfs/cvmfs/issues/events{/number}","events_url":"https://api.github.com/repos/cvmfs/cvmfs/events","assignees_url":"https://api.github.com/repos/cvmfs/cvmfs/assignees{/user}","branches_url":"https://api.github.com/repos/cvmfs/cvmfs/branches{/branch}","tags_url":"https://api.github.com/repos/cvmfs/cvmfs/tags","blobs_url":"https://api.github.com/repos/cvmfs/cvmfs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cvmfs/cvmfs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cvmfs/cvmfs/git/refs{/sha}","trees_url":"https://api.github.com/repos/cvmfs/cvmfs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cvmfs/cvmfs/statuses/{sha}","languages_url":"https://api.github.com/repos/cvmfs/cvmfs/languages","stargazers_url":"https://api.github.com/repos/cvmfs/cvmfs/stargazers","contributors_url":"https://api.github.com/repos/cvmfs/cvmfs/contributors","subscribers_url":"https://api.github.com/repos/cvmfs/cvmfs/subscribers","subscription_url":"https://api.github.com/repos/cvmfs/cvmfs/subscription","commits_url":"https://api.github.com/repos/cvmfs/cvmfs/commits{/sha}","git_commits_url":"https://api.github.com/repos/cvmfs/cvmfs/git/commits{/sha}","comments_url":"https://api.github.com/repos/cvmfs/cvmfs/comments{/number}","issue_comment_url":"https://api.github.com/repos/cvmfs/cvmfs/issues/comments{/number}","contents_url":"https://api.github.com/repos/cvmfs/cvmfs/contents/{+path}","compare_url":"https://api.github.com/repos/cvmfs/cvmfs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cvmfs/cvmfs/merges","archive_url":"https://api.github.com/repos/cvmfs/cvmfs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cvmfs/cvmfs/downloads","issues_url":"https://api.github.com/repos/cvmfs/cvmfs/issues{/number}","pulls_url":"https://api.github.com/repos/cvmfs/cvmfs/pulls{/number}","milestones_url":"https://api.github.com/repos/cvmfs/cvmfs/milestones{/number}","notifications_url":"https://api.github.com/repos/cvmfs/cvmfs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cvmfs/cvmfs/labels{/name}","releases_url":"https://api.github.com/repos/cvmfs/cvmfs/releases{/id}","created_at":"2012-03-21T09:10:41Z","updated_at":"2015-10-15T10:51:58Z","pushed_at":"2015-12-03T13:52:11Z","git_url":"git://github.com/cvmfs/cvmfs.git","ssh_url":"git@github.com:cvmfs/cvmfs.git","clone_url":"https://github.com/cvmfs/cvmfs.git","svn_url":"https://github.com/cvmfs/cvmfs","homepage":"http://cernvm.cern.ch/portal/filesystem","size":93344,"stargazers_count":39,"watchers_count":39,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":42,"mirror_url":null,"open_issues_count":8,"forks":42,"open_issues":8,"watchers":39,"default_branch":"devel"}},"_links":{"self":{"href":"https://api.github.com/repos/cvmfs/cvmfs/pulls/1232"},"html":{"href":"https://github.com/cvmfs/cvmfs/pull/1232"},"issue":{"href":"https://api.github.com/repos/cvmfs/cvmfs/issues/1232"},"comments":{"href":"https://api.github.com/repos/cvmfs/cvmfs/issues/1232/comments"},"review_comments":{"href":"https://api.github.com/repos/cvmfs/cvmfs/pulls/1232/comments"},"review_comment":{"href":"https://api.github.com/repos/cvmfs/cvmfs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cvmfs/cvmfs/pulls/1232/commits"},"statuses":{"href":"https://api.github.com/repos/cvmfs/cvmfs/statuses/9ff1dcfd2376ed6147279d2d9d3814a57b2984d2"}}}}