[PATCH aiaiai 6/7] aiaiai: extract patches from email prior to using git-am
dedekind1 at gmail.com
Mon Apr 7 03:19:01 PDT 2014
On Fri, 2014-04-04 at 15:06 -0700, Jacob Keller wrote:
> Some patch authors submit patches directly attached via git-format-patch
> output as an attachment. Sometimes they include both the patch and the
> inline diff. This is problematic because it causes aiaiai to fail to
> apply the patch, due to git being confused about the attached patch.
> This patch modifies how aiaiai reads the commits, using a python script
> which is capable of extracting the patches from the mbox (including
> attachments) before calling git-am.
> This helps aiaiai more easily handle this weird patch case, and still
> works great for regular patch submissions. In addition, turn on 3-way
> merge of git-am, so that duplicate patches will be properly ignored (as
> in the case with inlined and attached patches)
> Signed-off-by: Jacob Keller <jacob.e.keller at intel.com>
> helpers/aiaiai-extract-patches | 54 ++++++++++++++++++++++++++++++++++++++++++
> helpers/aiaiai-sh-functions | 2 +-
> 2 files changed, 55 insertions(+), 1 deletion(-)
> create mode 100755 helpers/aiaiai-extract-patches
Would you mind to clean-up the style a little. Try checking with pylint:
pylint --report=no aiaiai-extract-patches
> +++ b/helpers/aiaiai-extract-patches
> @@ -0,0 +1,54 @@
Would you please this shebang instead:
This is used in 'helpers/aiaiai-diff-log-helper', let's be consistent.
Also, the proper pythonic way to structure runnable scripts is like
this, for historical reasons:
"""Script entry point."""
... all your stuff goes here ...
if __name__ == "__main__":
Would you please re-strucutre? Check 'helpers/aiaiai-diff-log-helper'.
More information about the aiaiai