{"action":"created","issue":{"url":"https://api.github.com/repos/rtyley/bfg-repo-cleaner/issues/213","repository_url":"https://api.github.com/repos/rtyley/bfg-repo-cleaner","labels_url":"https://api.github.com/repos/rtyley/bfg-repo-cleaner/issues/213/labels{/name}","comments_url":"https://api.github.com/repos/rtyley/bfg-repo-cleaner/issues/213/comments","events_url":"https://api.github.com/repos/rtyley/bfg-repo-cleaner/issues/213/events","html_url":"https://github.com/rtyley/bfg-repo-cleaner/pull/213","id":225581814,"node_id":"MDExOlB1bGxSZXF1ZXN0MTE4NDgwMDc3","number":213,"title":"--blob-exec. Improved code originally developed by Paul Draper ","user":{"login":"dmgerman","id":167152,"node_id":"MDQ6VXNlcjE2NzE1Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/167152?v=4","gravatar_id":"","url":"https://api.github.com/users/dmgerman","html_url":"https://github.com/dmgerman","followers_url":"https://api.github.com/users/dmgerman/followers","following_url":"https://api.github.com/users/dmgerman/following{/other_user}","gists_url":"https://api.github.com/users/dmgerman/gists{/gist_id}","starred_url":"https://api.github.com/users/dmgerman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmgerman/subscriptions","organizations_url":"https://api.github.com/users/dmgerman/orgs","repos_url":"https://api.github.com/users/dmgerman/repos","events_url":"https://api.github.com/users/dmgerman/events{/privacy}","received_events_url":"https://api.github.com/users/dmgerman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-05-02T03:30:48Z","updated_at":"2018-05-30T17:58:38Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/rtyley/bfg-repo-cleaner/pulls/213","html_url":"https://github.com/rtyley/bfg-repo-cleaner/pull/213","diff_url":"https://github.com/rtyley/bfg-repo-cleaner/pull/213.diff","patch_url":"https://github.com/rtyley/bfg-repo-cleaner/pull/213.patch"},"body":"hi Roberto,\r\n\r\nI have improved the code by Paul Draper.  The main issue is that his original code did not properly wait for the children to complete. This lead to a crash under linux (see #169).\r\n\r\nI also added the ability to specify a regular expression to indicate the files that should be processed (my own bias, since I don't like file masks, as they are not \r\nas powerful as regexps). I have been using this patch to process several large repos (including linux and git) and it seems to be working well.\r\n\r\nThe script to execute should read the file from stdin, and output to stdout. Two environment variables are used to communicate between BFG and the script: BFG_BLOB (contains the blobid of the file to process) and BFG_FILENAME (contains the basename, including extension) of the file to process.\r\n\r\nIf the following conditions happen, the blob in the commit is not replaced:\r\n\r\n1. If the contents returned by the script are identical to the ones received, or\r\n2. The script returns an error code != 0\r\n\r\nThis pull request is a superset of #83 and addresses #169.\r\n\r\nRegarding licensing: my commits are licensed under the same license as BFG. Paul Draper submitted his commits in another pull request, who I presume, licensed the patch according to the contributing guidelines (https://github.com/rtyley/bfg-repo-cleaner/blob/master/CONTRIBUTING.md)\r\n\r\n--dmg"},"comment":{"url":"https://api.github.com/repos/rtyley/bfg-repo-cleaner/issues/comments/393258885","html_url":"https://github.com/rtyley/bfg-repo-cleaner/pull/213#issuecomment-393258885","issue_url":"https://api.github.com/repos/rtyley/bfg-repo-cleaner/issues/213","id":393258885,"node_id":"MDEyOklzc3VlQ29tbWVudDM5MzI1ODg4NQ==","user":{"login":"dmgerman","id":167152,"node_id":"MDQ6VXNlcjE2NzE1Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/167152?v=4","gravatar_id":"","url":"https://api.github.com/users/dmgerman","html_url":"https://github.com/dmgerman","followers_url":"https://api.github.com/users/dmgerman/followers","following_url":"https://api.github.com/users/dmgerman/following{/other_user}","gists_url":"https://api.github.com/users/dmgerman/gists{/gist_id}","starred_url":"https://api.github.com/users/dmgerman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmgerman/subscriptions","organizations_url":"https://api.github.com/users/dmgerman/orgs","repos_url":"https://api.github.com/users/dmgerman/repos","events_url":"https://api.github.com/users/dmgerman/events{/privacy}","received_events_url":"https://api.github.com/users/dmgerman/received_events","type":"User","site_admin":false},"created_at":"2018-05-30T17:58:38Z","updated_at":"2018-05-30T17:58:38Z","author_association":"NONE","body":"\nWilson Young <notifications@github.com> writes:\n\n> @dmgerman The command works on git dir, but got another error:\n> ```\n> Cleaning commits:        59% (161/272)Exception in thread \n> \"Thread-1686\" java.io.IOException: Broken pipe\n> \tat java.base/java.io.FileOutputStream.writeBytes(Native \n> Method)\n> \tat \n> java.base/java.io.FileOutputStream.write(FileOutputStream.java:355)\n> \tat \n> java.base/java.io.BufferedOutputStream.write(BufferedOutputStream.java:123)\n> \tat \n> java.base/java.io.FilterOutputStream.write(FilterOutputStream.java:108)\n> \tat \n> com.madgag.git.bfg.cleaner.BlobExecModifier.writeJob$1(BlobExecModifier.scala:44)\n> \tat \n> com.madgag.git.bfg.cleaner.BlobExecModifier.$anonfun$execute$4(BlobExecModifier.scala:49)\n> \tat \n> com.madgag.git.bfg.cleaner.BlobExecModifier.$anonfun$execute$4$adapted(BlobExecModifier.scala:49)\n> \tat \n> scala.sys.process.ProcessBuilderImpl$Simple.$anonfun$run$2(ProcessBuilderImpl.scala:75)\n> \tat \n> scala.sys.process.ProcessImpl$Spawn$$anon$1.run(ProcessImpl.scala:23)\n> ```\n>\n> Any clue?\n\nI might have seen this before... it might be that for certain \nblobs your script is failing.\nI would first try it with a very narrow regular expression \n(perhaps matching one file) and\nsee if it succeeds.\n\n---dmg\n\n"}}
{"actor":{"display_login":"dmgerman"}}