{"action":"opened","number":13,"pull_request":{"url":"https://api.github.com/repos/lesfurets/git-octopus/pulls/13","id":76879731,"html_url":"https://github.com/lesfurets/git-octopus/pull/13","diff_url":"https://github.com/lesfurets/git-octopus/pull/13.diff","patch_url":"https://github.com/lesfurets/git-octopus/pull/13.patch","issue_url":"https://api.github.com/repos/lesfurets/git-octopus/issues/13","number":13,"state":"open","locked":false,"title":"Added chunk mode","user":{"login":"benba","id":1714536,"avatar_url":"https://avatars.githubusercontent.com/u/1714536?v=3","gravatar_id":"","url":"https://api.github.com/users/benba","html_url":"https://github.com/benba","followers_url":"https://api.github.com/users/benba/followers","following_url":"https://api.github.com/users/benba/following{/other_user}","gists_url":"https://api.github.com/users/benba/gists{/gist_id}","starred_url":"https://api.github.com/users/benba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benba/subscriptions","organizations_url":"https://api.github.com/users/benba/orgs","repos_url":"https://api.github.com/users/benba/repos","events_url":"https://api.github.com/users/benba/events{/privacy}","received_events_url":"https://api.github.com/users/benba/received_events","type":"User","site_admin":false},"body":"The chunk mode is inspired by this answer of Linus Torvalds http://marc.info/?l=linux-kernel&m=139033182525831&w=2\r\nThe goal is to make the log cleaner to follow when lots of branches are part of the octopus merge (especially if graphical tools are used to browse the history).\r\n\r\nthe option is -s (for split) and take an integer argument as parameter (which is the number of branches per chunk).\r\nIt works combined with -n or with the signal interruption.\r\n\r\nI tried to minimize the impact on the script as much as I could.\r\nNote that I also introduced a check in case the no branches match the pattern, because the script were hanging in that case (in can separate this in another PR in needed).\r\nAlso I'm not sure to have understood properly the triggeredBranch variable.\r\nIn some cases it contains a branch name, in others a sha1. Therefore I've created another variable that always the contains the sha1 to be able to reset the triggeredBranch at the correct state.\r\n\r\nLast some screenshots of the result with a dumb repo that contains 101 branches to be merged.\r\n\r\n_Without the chunk mode:_\r\n![101 branches command line without chunks](https://cloud.githubusercontent.com/assets/1714536/16715182/b046cde2-46d9-11e6-8f4b-d0b6c0a36226.png)\r\n![101 branches gitk without chunks](https://cloud.githubusercontent.com/assets/1714536/16715184/b05f46f6-46d9-11e6-91fb-dfb11b83efae.png)\r\n_With -s10:_\r\n![101 branches command line with chunks](https://cloud.githubusercontent.com/assets/1714536/16715183/b058487e-46d9-11e6-88e2-453ba4520d3b.png)\r\n![101 branches gitk with chunks](https://cloud.githubusercontent.com/assets/1714536/16715181/b0364dbe-46d9-11e6-920b-c179fafd9b0e.png)\r\n\r\n","created_at":"2016-07-10T18:10:23Z","updated_at":"2016-07-10T18:10:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/lesfurets/git-octopus/pulls/13/commits","review_comments_url":"https://api.github.com/repos/lesfurets/git-octopus/pulls/13/comments","review_comment_url":"https://api.github.com/repos/lesfurets/git-octopus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lesfurets/git-octopus/issues/13/comments","statuses_url":"https://api.github.com/repos/lesfurets/git-octopus/statuses/74330a44a05b056ba8ecabde36b8f3f47b1c5de0","head":{"label":"benba:chunkmode","ref":"chunkmode","sha":"74330a44a05b056ba8ecabde36b8f3f47b1c5de0","user":{"login":"benba","id":1714536,"avatar_url":"https://avatars.githubusercontent.com/u/1714536?v=3","gravatar_id":"","url":"https://api.github.com/users/benba","html_url":"https://github.com/benba","followers_url":"https://api.github.com/users/benba/followers","following_url":"https://api.github.com/users/benba/following{/other_user}","gists_url":"https://api.github.com/users/benba/gists{/gist_id}","starred_url":"https://api.github.com/users/benba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benba/subscriptions","organizations_url":"https://api.github.com/users/benba/orgs","repos_url":"https://api.github.com/users/benba/repos","events_url":"https://api.github.com/users/benba/events{/privacy}","received_events_url":"https://api.github.com/users/benba/received_events","type":"User","site_admin":false},"repo":{"id":63011134,"name":"git-octopus","full_name":"benba/git-octopus","owner":{"login":"benba","id":1714536,"avatar_url":"https://avatars.githubusercontent.com/u/1714536?v=3","gravatar_id":"","url":"https://api.github.com/users/benba","html_url":"https://github.com/benba","followers_url":"https://api.github.com/users/benba/followers","following_url":"https://api.github.com/users/benba/following{/other_user}","gists_url":"https://api.github.com/users/benba/gists{/gist_id}","starred_url":"https://api.github.com/users/benba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benba/subscriptions","organizations_url":"https://api.github.com/users/benba/orgs","repos_url":"https://api.github.com/users/benba/repos","events_url":"https://api.github.com/users/benba/events{/privacy}","received_events_url":"https://api.github.com/users/benba/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/benba/git-octopus","description":"Extension of git-merge that accept branch naming patterns","fork":true,"url":"https://api.github.com/repos/benba/git-octopus","forks_url":"https://api.github.com/repos/benba/git-octopus/forks","keys_url":"https://api.github.com/repos/benba/git-octopus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/benba/git-octopus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/benba/git-octopus/teams","hooks_url":"https://api.github.com/repos/benba/git-octopus/hooks","issue_events_url":"https://api.github.com/repos/benba/git-octopus/issues/events{/number}","events_url":"https://api.github.com/repos/benba/git-octopus/events","assignees_url":"https://api.github.com/repos/benba/git-octopus/assignees{/user}","branches_url":"https://api.github.com/repos/benba/git-octopus/branches{/branch}","tags_url":"https://api.github.com/repos/benba/git-octopus/tags","blobs_url":"https://api.github.com/repos/benba/git-octopus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/benba/git-octopus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/benba/git-octopus/git/refs{/sha}","trees_url":"https://api.github.com/repos/benba/git-octopus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/benba/git-octopus/statuses/{sha}","languages_url":"https://api.github.com/repos/benba/git-octopus/languages","stargazers_url":"https://api.github.com/repos/benba/git-octopus/stargazers","contributors_url":"https://api.github.com/repos/benba/git-octopus/contributors","subscribers_url":"https://api.github.com/repos/benba/git-octopus/subscribers","subscription_url":"https://api.github.com/repos/benba/git-octopus/subscription","commits_url":"https://api.github.com/repos/benba/git-octopus/commits{/sha}","git_commits_url":"https://api.github.com/repos/benba/git-octopus/git/commits{/sha}","comments_url":"https://api.github.com/repos/benba/git-octopus/comments{/number}","issue_comment_url":"https://api.github.com/repos/benba/git-octopus/issues/comments{/number}","contents_url":"https://api.github.com/repos/benba/git-octopus/contents/{+path}","compare_url":"https://api.github.com/repos/benba/git-octopus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/benba/git-octopus/merges","archive_url":"https://api.github.com/repos/benba/git-octopus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/benba/git-octopus/downloads","issues_url":"https://api.github.com/repos/benba/git-octopus/issues{/number}","pulls_url":"https://api.github.com/repos/benba/git-octopus/pulls{/number}","milestones_url":"https://api.github.com/repos/benba/git-octopus/milestones{/number}","notifications_url":"https://api.github.com/repos/benba/git-octopus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/benba/git-octopus/labels{/name}","releases_url":"https://api.github.com/repos/benba/git-octopus/releases{/id}","deployments_url":"https://api.github.com/repos/benba/git-octopus/deployments","created_at":"2016-07-10T17:45:38Z","updated_at":"2016-07-10T17:45:39Z","pushed_at":"2016-07-10T17:49:05Z","git_url":"git://github.com/benba/git-octopus.git","ssh_url":"git@github.com:benba/git-octopus.git","clone_url":"https://github.com/benba/git-octopus.git","svn_url":"https://github.com/benba/git-octopus","homepage":"","size":102,"stargazers_count":0,"watchers_count":0,"language":"Shell","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":"lesfurets:master","ref":"master","sha":"7f740ef07097a72fb40bf7b39d175f5c2b1c83c5","user":{"login":"lesfurets","id":2929204,"avatar_url":"https://avatars.githubusercontent.com/u/2929204?v=3","gravatar_id":"","url":"https://api.github.com/users/lesfurets","html_url":"https://github.com/lesfurets","followers_url":"https://api.github.com/users/lesfurets/followers","following_url":"https://api.github.com/users/lesfurets/following{/other_user}","gists_url":"https://api.github.com/users/lesfurets/gists{/gist_id}","starred_url":"https://api.github.com/users/lesfurets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lesfurets/subscriptions","organizations_url":"https://api.github.com/users/lesfurets/orgs","repos_url":"https://api.github.com/users/lesfurets/repos","events_url":"https://api.github.com/users/lesfurets/events{/privacy}","received_events_url":"https://api.github.com/users/lesfurets/received_events","type":"Organization","site_admin":false},"repo":{"id":20454259,"name":"git-octopus","full_name":"lesfurets/git-octopus","owner":{"login":"lesfurets","id":2929204,"avatar_url":"https://avatars.githubusercontent.com/u/2929204?v=3","gravatar_id":"","url":"https://api.github.com/users/lesfurets","html_url":"https://github.com/lesfurets","followers_url":"https://api.github.com/users/lesfurets/followers","following_url":"https://api.github.com/users/lesfurets/following{/other_user}","gists_url":"https://api.github.com/users/lesfurets/gists{/gist_id}","starred_url":"https://api.github.com/users/lesfurets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lesfurets/subscriptions","organizations_url":"https://api.github.com/users/lesfurets/orgs","repos_url":"https://api.github.com/users/lesfurets/repos","events_url":"https://api.github.com/users/lesfurets/events{/privacy}","received_events_url":"https://api.github.com/users/lesfurets/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lesfurets/git-octopus","description":"Extension of git-merge that accept branch naming patterns","fork":false,"url":"https://api.github.com/repos/lesfurets/git-octopus","forks_url":"https://api.github.com/repos/lesfurets/git-octopus/forks","keys_url":"https://api.github.com/repos/lesfurets/git-octopus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lesfurets/git-octopus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lesfurets/git-octopus/teams","hooks_url":"https://api.github.com/repos/lesfurets/git-octopus/hooks","issue_events_url":"https://api.github.com/repos/lesfurets/git-octopus/issues/events{/number}","events_url":"https://api.github.com/repos/lesfurets/git-octopus/events","assignees_url":"https://api.github.com/repos/lesfurets/git-octopus/assignees{/user}","branches_url":"https://api.github.com/repos/lesfurets/git-octopus/branches{/branch}","tags_url":"https://api.github.com/repos/lesfurets/git-octopus/tags","blobs_url":"https://api.github.com/repos/lesfurets/git-octopus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lesfurets/git-octopus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lesfurets/git-octopus/git/refs{/sha}","trees_url":"https://api.github.com/repos/lesfurets/git-octopus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lesfurets/git-octopus/statuses/{sha}","languages_url":"https://api.github.com/repos/lesfurets/git-octopus/languages","stargazers_url":"https://api.github.com/repos/lesfurets/git-octopus/stargazers","contributors_url":"https://api.github.com/repos/lesfurets/git-octopus/contributors","subscribers_url":"https://api.github.com/repos/lesfurets/git-octopus/subscribers","subscription_url":"https://api.github.com/repos/lesfurets/git-octopus/subscription","commits_url":"https://api.github.com/repos/lesfurets/git-octopus/commits{/sha}","git_commits_url":"https://api.github.com/repos/lesfurets/git-octopus/git/commits{/sha}","comments_url":"https://api.github.com/repos/lesfurets/git-octopus/comments{/number}","issue_comment_url":"https://api.github.com/repos/lesfurets/git-octopus/issues/comments{/number}","contents_url":"https://api.github.com/repos/lesfurets/git-octopus/contents/{+path}","compare_url":"https://api.github.com/repos/lesfurets/git-octopus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lesfurets/git-octopus/merges","archive_url":"https://api.github.com/repos/lesfurets/git-octopus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lesfurets/git-octopus/downloads","issues_url":"https://api.github.com/repos/lesfurets/git-octopus/issues{/number}","pulls_url":"https://api.github.com/repos/lesfurets/git-octopus/pulls{/number}","milestones_url":"https://api.github.com/repos/lesfurets/git-octopus/milestones{/number}","notifications_url":"https://api.github.com/repos/lesfurets/git-octopus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lesfurets/git-octopus/labels{/name}","releases_url":"https://api.github.com/repos/lesfurets/git-octopus/releases{/id}","deployments_url":"https://api.github.com/repos/lesfurets/git-octopus/deployments","created_at":"2014-06-03T18:25:55Z","updated_at":"2016-07-03T18:31:21Z","pushed_at":"2016-06-29T12:54:32Z","git_url":"git://github.com/lesfurets/git-octopus.git","ssh_url":"git@github.com:lesfurets/git-octopus.git","clone_url":"https://github.com/lesfurets/git-octopus.git","svn_url":"https://github.com/lesfurets/git-octopus","homepage":"","size":102,"stargazers_count":95,"watchers_count":95,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":13,"mirror_url":null,"open_issues_count":2,"forks":13,"open_issues":2,"watchers":95,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lesfurets/git-octopus/pulls/13"},"html":{"href":"https://github.com/lesfurets/git-octopus/pull/13"},"issue":{"href":"https://api.github.com/repos/lesfurets/git-octopus/issues/13"},"comments":{"href":"https://api.github.com/repos/lesfurets/git-octopus/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/lesfurets/git-octopus/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/lesfurets/git-octopus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lesfurets/git-octopus/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/lesfurets/git-octopus/statuses/74330a44a05b056ba8ecabde36b8f3f47b1c5de0"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":49,"deletions":17,"changed_files":1}}
{"actor":{"display_login":"benba"}}