{"thread":{"id":"4166","subject":"[PATCH] Implement git-quiltimport","startedAt":"2006-05-16T16:51:49Z","lastAt":"2006-06-02T00:24:04Z","messageCount":24,"participants":["Eric W. Biederman","Linus Torvalds","Junio C Hamano","Greg KH"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"20070","messageId":"m1k68l6hga.fsf@ebiederm.dsl.xmission.com","threadId":"4166","inReplyTo":null,"subject":"[PATCH] Implement git-quiltimport","fromName":"Eric W. Biederman","fromEmail":"ebiederm@xmission.com","sentAt":"2006-05-16T16:51:49Z","receivedAt":"2006-05-16T16:51:49Z","isPatch":true,"sender":{"key":"ebiederm@xmission.com","avatar":"https://avatars.githubusercontent.com/u/7477136?v=4"},"body":"\nImporting a quilt patch series into git is not very difficult\nbut parsing the patch descriptions and all of the other\nminutia take a bit of effort to get right, so this automates it.\n\nSince git and quilt complement each other it makes sense\nto make it easy to go back and forth between the two.\n\n---\n\nEric\n\n Documentation/git-quiltimport.txt |   50 +++++++++++++++++++++\n Makefile                          |    2 -\n git-quiltimport.sh                |   88 +++++++++++++++++++++++++++++++++++++\n 3 files changed, 139 insertions(+), 1 deletions(-)\n create mode 100644 Documentation/git-quiltimport.txt\n create mode 100644 git-quiltimport.sh\n\n2256c7e9b3913732a5c3a2e54cdea20fc951b76d\ndiff --git a/Documentation/git-quiltimport.txt b/Documentation/git-quiltimport.txt\nnew file mode 100644\nindex 0000000..8ea20eb\n--- /dev/null\n+++ b/Documentation/git-quiltimport.txt\n@@ -0,0 +1,50 @@\n+git-quiltimport(1)\n+================\n+\n+NAME\n+----\n+git-quiltimport - Applies a quilt patchset onto the current branch\n+\n+\n+SYNOPSIS\n+--------\n+[verse]\n+'git-quiltimport' [--author <author>] [--patches <dir>]\n+\n+\n+DESCRIPTION\n+-----------\n+Applies a quilt patchset onto the current git branch, preserving\n+the patch boundaries, patch order, and patch descriptions present\n+in the quilt patchset.\n+\n+For each patch the code attempts to extract the author from the \n+patch description.  If that fails it falls back to the author\n+specified with --author.  If the --author flag was not given\n+the the author is recorded as unknown.\n+\n+The patch name is preserved as the 1 line subject in the git\n+description.\n+\n+OPTIONS\n+-------\n+--author Author Name <Author Email>::\n+\tThe author name and email address to use when no author\n+\tinformation can be found in the patch description.\n+\n+--patches <dir>::\n+\tThe directory to find the quilt patches and the\n+\tquilt series file.\n+\n+Author\n+------\n+Written by Eric Biederman <ebiederm@lnxi.com>\n+\n+Documentation\n+--------------\n+Documentation by Eric Biederman <ebiederm@lnxi.com>\n+\n+GIT\n+---\n+Part of the gitlink:git[7] suite\n+\ndiff --git a/Makefile b/Makefile\nindex 37fbe78..1f4abe6 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -125,7 +125,7 @@ SCRIPT_SH = \\\n \tgit-applymbox.sh git-applypatch.sh git-am.sh \\\n \tgit-merge.sh git-merge-stupid.sh git-merge-octopus.sh \\\n \tgit-merge-resolve.sh git-merge-ours.sh git-grep.sh \\\n-\tgit-lost-found.sh\n+\tgit-lost-found.sh git-quiltimport.sh\n \n SCRIPT_PERL = \\\n \tgit-archimport.perl git-cvsimport.perl git-relink.perl \\\ndiff --git a/git-quiltimport.sh b/git-quiltimport.sh\nnew file mode 100644\nindex 0000000..534be82\n--- /dev/null\n+++ b/git-quiltimport.sh\n@@ -0,0 +1,88 @@\n+#!/bin/sh\n+USAGE='--author <author> --patches </path/to/quilt/patch/directory>'\n+SUBDIRECTORY_ON=Yes\n+. git-sh-setup\n+\n+quilt_author=\"Unknown <unknown>\"\n+while case \"$#\" in 0) break;; esac\n+do\n+\tcase \"$1\" in\n+\t--au=*|--aut=*|--auth=*|--autho=*|--author=*)\n+\t\tquilt_author=$(expr \"$1\" : '-[^=]*\\(.*\\)')\n+\t\tshift\n+\t\t;;\n+\t\n+\t--au|--aut|--auth|--autho|--author)\n+\t\tcase \"$#\" in 1) usage ;; esac\n+\t\tshift\n+\t\tquilt_author=\"$1\"\n+\t\tshift\n+\t\t;;\n+\n+\t--pa=*|--pat=*|--patc=*|--patch=*|--patche=*|--patches=*)\n+\t\tQUILT_PATCHES=$(expr \"$1\" : '-[^=]*\\(.*\\)')\n+\t\tshift\n+\t\t;;\n+\t\n+\t--pa|--pat|--patc|--patch|--patche|--patches)\n+\t\tcase \"$#\" in 1) usage ;; esac\n+\t\tshift\n+\t\tQUILT_PATCHES=\"$1\"\n+\t\tshift\n+\t\t;;\n+\t\n+\t*)\n+\t\tbreak\n+\t\t;;\n+\tesac\n+done\n+\n+# Quilt Author\n+quilt_author_name=$(expr \"z$quilt_author\" : 'z\\(.*[^ ]\\) *<.*') &&\n+quilt_author_email=$(expr \"z$quilt_author\" : '.*\\(<.*\\)') &&\n+test '' != \"$quilt_author_name\" &&\n+test '' != \"$quilt_author_email\" ||\n+die \"malformatted --author parameter\"\n+\n+# Quilt patch directory\n+: ${QUILT_PATCHES:=patches}\n+if ! [ -d \"$QUILT_PATCHES\" ] ; then\n+\techo \"The \\\"$QUILT_PATCHES\\\" directory does not exist.\"\n+\texit 1\n+fi\n+\n+# Temporay directories\n+tmp_dir=.dotest\n+tmp_msg=\"$tmp_dir/msg\"\n+tmp_patch=\"$tmp_dir/patch\"\n+tmp_info=\"$tmp_dir/info\"\n+\n+\n+# Find the intial commit\n+commit=$(git-rev-parse HEAD)\n+\n+mkdir $tmp_dir || exit 2\n+cat \"$QUILT_PATCHES/series\" | grep -v '^#' | \n+while read line ; do \n+\techo $line\n+\t(cat $QUILT_PATCHES/$line | git-mailinfo \"$tmp_msg\" \"$tmp_patch\" > \"$tmp_info\") || exit 3\n+\t\n+\t# Parse the author information\n+\texport GIT_AUTHOR_NAME=$(sed -ne 's/Author: //p' \"$tmp_info\")\n+\texport GIT_AUTHOR_EMAIL=$(sed -ne 's/Email: //p' \"$tmp_info\")\n+\tif [ -z \"$GIT_AUTHOR_EMAIL\" ] ; then\n+\t\tGIT_AUTHOR_NAME=$quilt_author_name\n+\t\tGIT_AUTHOR_EMAIL=$quilt_author_email\n+\tfi\n+\texport GIT_AUTHOR_DATE=$(sed -ne 's/Date: //p' \"$tmp_info\")\n+\texport SUBJECT=$(sed -ne 's/Subject: //p' \"$tmp_info\")\n+\tif [ -z \"$SUBJECT\" ] ; then\n+\t\tSUBJECT=$(echo $line | sed -e 's/.patch$//')\n+\tfi\n+\n+\tgit-apply --index -C1 \"$tmp_patch\" &&\n+\ttree=$(git-write-tree) &&\n+\tcommit=$((echo \"$SUBJECT\"; echo; cat \"$tmp_msg\") | git-commit-tree $tree -p $commit) &&\n+\tgit-update-ref HEAD $commit || exit 4\n+done\n+rm -rf $tmp_dir || exit 5\n-- \n1.3.2.g2256\n"},{"id":"20071","messageId":"Pine.LNX.4.64.0605161001190.3866@g5.osdl.org","threadId":"4166","inReplyTo":"m1k68l6hga.fsf@ebiederm.dsl.xmission.com","subject":"Re: [PATCH] Implement git-quiltimport","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2006-05-16T17:03:19Z","receivedAt":"2006-05-16T17:03:19Z","isPatch":true,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Tue, 16 May 2006, Eric W. Biederman wrote:\n>\n> If the --author flag was not given the the author is recorded as \n> unknown.\n\nPlease don't do this. Just error out. It would be horrible to have a quilt \nimport \"succeed\", and then later notice that some of the patches had \nincorrect authorship attribution just because the import script didn't \ncheck it, but just made it \"unknown\".\n\nAn un-attributed patch is simply not acceptable in any serious project. \nIt's much better to consider it an error than to say \"ok\".\n\n\t\tLinus\n"},{"id":"20074","messageId":"m1bqtx6el6.fsf@ebiederm.dsl.xmission.com","threadId":"4166","inReplyTo":"Pine.LNX.4.64.0605161001190.3866@g5.osdl.org","subject":"Re: [PATCH] Implement git-quiltimport","fromName":"Eric W. Biederman","fromEmail":"ebiederm@xmission.com","sentAt":"2006-05-16T17:53:41Z","receivedAt":"2006-05-16T17:53:41Z","isPatch":true,"sender":{"key":"ebiederm@xmission.com","avatar":"https://avatars.githubusercontent.com/u/7477136?v=4"},"body":"Linus Torvalds <torvalds@osdl.org> writes:\n\n> On Tue, 16 May 2006, Eric W. Biederman wrote:\n>>\n>> If the --author flag was not given the the author is recorded as \n>> unknown.\n>\n> Please don't do this. Just error out. It would be horrible to have a quilt \n> import \"succeed\", and then later notice that some of the patches had \n> incorrect authorship attribution just because the import script didn't \n> check it, but just made it \"unknown\".\n>\n> An un-attributed patch is simply not acceptable in any serious project. \n> It's much better to consider it an error than to say \"ok\".\n\nThere are two practical problems with this.\n1) quilt does not force any authorship information to be preserved,\n   in the description, so this probably a common case.  Although for\n   most users just needing to specify --author sounds reasonable.\n\n2) There are currently 84 out of roughly 1322 patches in\n   2.6.17-rc4-mm1 that git-mailinfo cannot compute the author for.\n   Generally the information is there but in such an irregular form\n   that it cannot be automatically detected.\n\n   If we can resolve that problem I am willing to make it an error.\n   If we can't then sucking quilt patches into a git tree is much\n   less useful.  \n\n   Given the ugliness in -mm making it an error to have an\n   non-attributed patch would result in people specifying --author\n   when they really don't know who the author is, giving us much\n   less reliable information.\n\n   Possibly what we need is an option to not make it an error so that\n   people doing this kind of thing in their own trees have useful\n   information.\n\n\nThe list of patches that git-mailinfo cannot find authorship\ninformation for from 2.6.17-rc4-mm1 is included below.  Mostly these\nare either git trees splatted into a single file, or simply fixes\nadded by Andrew.  But there are some like: gregkh-usb-usb-gotemp\nthat have no description at all and only the patch name records who\nmade the patch.\n\nA really ugly case is acx1xx-wireless-driver patch, which\nappears to have multiple authors and a serious history\nbefore Andrew got it.\n\n>From acx1xx-wireless-driver.patch\n> acx100.sourceforge.net (Andreas Mohr <andi@rhlx01.fht-esslingen.de>) ->\n>   -> Denis Vlasenko <vda@ilport.com.ua>\n>      -> Jeff Garzik <jgarzik@pobox.com>\n>         -> me\n> \n> DESC\n> acx1xx-wireless-driver-usb-is-bust\n> EDESC\n> From: Andrew Morton <akpm@osdl.org>\n> \n> drivers/net/wireless/tiacx/usb.c:1116: `URB_ASYNC_UNLINK' undeclared (first use in this function)\n> \n> Cc: Denis Vlasenko <vda@ilport.com.ua>\n> DESC\n> acx1xx-allow-modular-build\n> EDESC\n> From: Andrew Morton <akpm@osdl.org>\n> DESC\n> acx1xx-wireless-driver-spy_offset-went-away\n> EDESC\n> From: Andrew Morton <akpm@osdl.org>\n> \n> Cc: Denis Vlasenko <vda@ilport.com.ua>\n> DESC\n> acx update\n> EDESC\n> From: Denis Vlasenko <vda@ilport.com.ua>\n> \n> > > Attached is a patch which updates acx. All your changes are\n> > > included too. allyesconfig build is fixed by unifying\n> > > PCI and USB modules into one. 'acx_debug' parameter is renamed back\n> > > to just 'debug' (because all previous versions used it and\n> > > we don't want to add to user confusion).\n> > >\n> > > Please apply.\n> > >\n> > > Signed-off-by: Denis Vlasenko <vda@ilport.com.ua>\n> >\n> > I missed a spy_offset fix. Updated patch is attached.\n> > Also it is at\n> > http://195.66.192.167/linux/acx_patches/linux-2.6.13-mm2acx-2.patch.bz2\n> \n> Oh no. Yes. I forgot to remove some standalone build aids.\n> \n> DESC\n> acx-update 2\n> EDESC\n> From: Denis Vlasenko <vda@ilport.com.ua>\n> \n> [20051016] 0.3.13\n> * Revert 20051013 fix, we have one which actually works.\n>   Thanks Jacek Jablonski <yacek87@gmail.com> for testing!\n> \n> [20051013]\n> * trying to fix \"yet another similar bug\"\n> * usb fix by Carlos Martin\n> \n> [20051012] 0.3.12\n> * acx_l_clean_tx_desc bug fixed - was stopping tx completely\n>   at high load. (It seems there exists yet another similar bug!)\n> * \"unknown IE\" dump was 2 bytes too short - fixed\n> * DUP logging made less noisy\n> * another usb fix by Carlos Martin <carlosmn@gmail.com>\n> \n> [20051003]\n> * several usb fixes by Carlos Martin <carlosmn@gmail.com> - thanks!\n> * unknown IE logging made less noisy\n> * few unknown IEs added to the growing collection\n> * version bump to 0.3.11\n> \n> [20050916]\n> * fix bogus MTU handling, add ability to change MTU\n> * fix WLAN_DATA_MAXLEN: 2312 -> 2304\n> * version bump to 0.3.10\n> \n> [20050915]\n> * by popular request default mode is 'managed'\n> * empty handler for EID 7 (country info) is added\n> * fix 'timer not started - iface is not up'\n> * tx[host]desc micro optimizations\n> * version bump to 0.3.9\n> \n> [20050914]\n> * tx[host]desc ring workings brought a bit back to two-hostdesc\n>   scheme. This is an attempt to fix weird WG311v2 bug.\n>   I still fail to understand how same chip with same fw can\n>   work for me but do not work for a WG311v2 owner. Mystery.\n> * README updated\n> * version bump to 0.3.8\n> \n> [20050913]\n> * variable and fields with awful names renamed\n> * a few fields dropped (they had constant values)\n> * small optimization to acx_l_clean_tx_desc()\n> * version bump to 0.3.7\n\n      origin\n      git-acpi\n      git-agpgart\n      git-alsa\n      git-block\n      git-cfq\n      git-cifs\n      git-dvb\n      git-gfs2\n      git-ia64\n      git-ieee1394\n      git-infiniband\n      git-intelfb\n      sane-menuconfig-colours\n      git-klibc\n      git-hdrcleanup\n      git-hdrinstall\n      git-libata-all\n      libata_resume_fix\n      git-mips\n      git-mtd\n      git-netdev-all\n      git-nfs\n      git-ocfs2\n      git-powerpc\n      git-rbtree\n      git-sas\n      gregkh-pci-acpiphp-configure-_prt-v3\n      gregkh-pci-acpiphp-hotplug-slot-hotplug\n      gregkh-pci-acpiphp-host-and-p2p-hotplug\n      gregkh-pci-acpiphp-turn-off-slot-power-at-error-case\n      gregkh-pci-pci-legacy-i-o-port-free-driver-changes-to-generic-pci-code\n      gregkh-pci-pci-legacy-i-o-port-free-driver-update-documentation-pci_txt\n      gregkh-pci-pci-legacy-i-o-port-free-driver-make-intel-e1000-driver-legacy-i-o-port-free\n      gregkh-pci-pci-64-bit-resources-drivers-pci-changes\n      gregkh-pci-pci-64-bit-resources-drivers-media-changes\n      gregkh-pci-pci-64-bit-resources-drivers-net-changes\n      gregkh-pci-pci-64-bit-resources-drivers-pcmcia-changes\n      gregkh-pci-pci-64-bit-resources-drivers-others-changes\n      gregkh-pci-pci-msi-abstractions-and-support-for-altix\n      git-pcmcia\n      git-scsi-target\n      gregkh-usb-usb-gotemp\n      git-supertrak\n      git-watchdog\n      x86_64-mm-defconfig-update\n      x86_64-mm-memset-always-inline\n      x86_64-mm-amd-core-cpuid\n      x86_64-mm-amd-cpuid4\n      x86_64-mm-alternatives\n      x86_64-mm-ia32-unistd-cleanup\n      x86_64-mm-topology-comment\n      x86_64-mm-new-compat-ptrace\n      x86_64-mm-disable-agp-resource-check\n      x86_64-mm-new-northbridge\n      x86_64-mm-iommu-warning\n      x86_64-mm-i386-up-generic-arch\n      x86_64-mm-iommu-enodev\n      x86_64-mm-compat-printk\n      x86_64-mm-i386-numa-summit-check\n      x86_64-mm-fix-b44-checks\n      x86_64-mm-nommu-warning\n      git-cryptodev\n      mm\n      acx1xx-wireless-driver\n      reiser4-export-find_get_pages\n      kgdb-core-lite\n      kgdb-8250\n      kgdb-netpoll_pass_skb_to_rx_hook\n      kgdb-eth\n      kgdb-i386-lite\n      kgdb-cfi_annotations\n      kgdb-sysrq_bugfix\n      kgdb-module\n      kgdb-core\n      kgdb-i386\n      journal_add_journal_head-debug\n      list_del-debug\n      unplug-can-sleep\n      firestream-warnings\n      git-viro-bird-m32r\n      git-viro-bird-m68k\n      git-viro-bird-frv\n      git-viro-bird-upf\n      git-viro-bird-volatile\n\nEric\n"},{"id":"20076","messageId":"7vbqtxaj5k.fsf@assigned-by-dhcp.cox.net","threadId":"4166","inReplyTo":"m1bqtx6el6.fsf@ebiederm.dsl.xmission.com","subject":"Re: [PATCH] Implement git-quiltimport","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-05-16T19:01:27Z","receivedAt":"2006-05-16T19:01:27Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"ebiederm@xmission.com (Eric W. Biederman) writes:\n\n>    Given the ugliness in -mm making it an error to have an\n>    non-attributed patch would result in people specifying --author\n>    when they really don't know who the author is, giving us much\n>    less reliable information.\n>\n>    Possibly what we need is an option to not make it an error so that\n>    people doing this kind of thing in their own trees have useful\n>    information.\n\nI agree it is probably a good way to error by default, optinally\nallowing to say \"don't care\".  I do not think Linus would pull\nfrom such a tree or trees branched from it into his official\ntree, so I do not think we would need to worry about commits\nwith incomplete information propagating for this particular\n\"gitified mm\" usage.  But as a general purpose tool to produce\n\"gitified quilt series\" tree, we would.\n\nIt depends on the expected use of the resulting gitified mm\ntree.\n\nIf it is for an individual developer to futz with and tweak\nupon, and the end result from the work leaves such a \"gitified\nquilt series\" repository only as a patch form, then not having\nto figure out and specify authorship information to many patches\nis probably a plus; the information will not be part of the\nofficial history recorded elsewhere anyway.\n\nHowever, if it is to produce a reference git tree to point\npeople at, (i.e. the quiltimport script is run once per a series\nby somebody and the result is published for public use), I would\nimagine we would want to have the attribution straight, so if\nthe tool has to \"guess\", it should either error out or go\ninteractive and ask.\n"},{"id":"20106","messageId":"m13bf95ixo.fsf@ebiederm.dsl.xmission.com","threadId":"4166","inReplyTo":"7vbqtxaj5k.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Implement git-quiltimport","fromName":"Eric W. Biederman","fromEmail":"ebiederm@xmission.com","sentAt":"2006-05-17T05:17:23Z","receivedAt":"2006-05-17T05:17:23Z","isPatch":true,"sender":{"key":"ebiederm@xmission.com","avatar":"https://avatars.githubusercontent.com/u/7477136?v=4"},"body":"Junio C Hamano <junkio@cox.net> writes:\n\n> ebiederm@xmission.com (Eric W. Biederman) writes:\n>\n>>    Given the ugliness in -mm making it an error to have an\n>>    non-attributed patch would result in people specifying --author\n>>    when they really don't know who the author is, giving us much\n>>    less reliable information.\n>>\n>>    Possibly what we need is an option to not make it an error so that\n>>    people doing this kind of thing in their own trees have useful\n>>    information.\n>\n> I agree it is probably a good way to error by default, optinally\n> allowing to say \"don't care\".  I do not think Linus would pull\n> from such a tree or trees branched from it into his official\n> tree, so I do not think we would need to worry about commits\n> with incomplete information propagating for this particular\n> \"gitified mm\" usage.  But as a general purpose tool to produce\n> \"gitified quilt series\" tree, we would.\n>\n> It depends on the expected use of the resulting gitified mm\n> tree.\n>\n> If it is for an individual developer to futz with and tweak\n> upon, and the end result from the work leaves such a \"gitified\n> quilt series\" repository only as a patch form, then not having\n> to figure out and specify authorship information to many patches\n> is probably a plus; the information will not be part of the\n> official history recorded elsewhere anyway.\n\nSo what we need for this case really is a way to mark the\ncommit objects in such a way that git-fetch or git-merge\nwould choke on the commit objects and refuse to merge.\nThat way the changes could not easily propagate in the wild.\nEvery user would at least have to specify a non-default option,\nthat Linus at least would never specify.\n\nThis scenario is how I have been primarily using such a tree.\n\n> However, if it is to produce a reference git tree to point\n> people at, (i.e. the quiltimport script is run once per a series\n> by somebody and the result is published for public use), I would\n> imagine we would want to have the attribution straight, so if\n> the tool has to \"guess\", it should either error out or go\n> interactive and ask.\n\nReasonable.  Going interactive is probably the best way since it\nappears that the patches do have sufficient information to derive\nthe user information from.  I know people have at various times\nin the past made the Andrews tree available in git form so you\ncould do things like git-bisect, etc.  So I think we need to address\nthis issue.  Probably by at least asking Andrew about it.\n\nI will take a look at the policy and see what I can do.  At\nthe very least the default we be to error on such a tree.\n\n..\n\nA infrastructure question came to me when looking at this:\nseveral of the patches are from a branch with several authors.\nHow do we specify a commit in git with several authors?\n\nThere are cases when you have enough collaboration that even\na single patch could have multiple authors, contributing equally.\n\nEric\n"},{"id":"20107","messageId":"7v1wut2p5z.fsf@assigned-by-dhcp.cox.net","threadId":"4166","inReplyTo":"m13bf95ixo.fsf@ebiederm.dsl.xmission.com","subject":"Re: [PATCH] Implement git-quiltimport","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-05-17T05:31:04Z","receivedAt":"2006-05-17T05:31:04Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"ebiederm@xmission.com (Eric W. Biederman) writes:\n\n> A infrastructure question came to me when looking at this:\n> several of the patches are from a branch with several authors.\n> How do we specify a commit in git with several authors?\n>\n> There are cases when you have enough collaboration that even\n> a single patch could have multiple authors, contributing equally.\n\nThe object format allows one author and one committer, but they\nare only used for human consumption and log summarizing purposes\nby the core.  We could extend it to support more than one but I\ndoubt it is worth it.\n\nI would say it would be best to place the primary contact\nperson, incase somebody has a problem with that particular patch\ndone by such a group, on the author line.  Listing everybody\ninvolved to give credits to them at the end of the log message\nwould also be a good idea, and that's where we usually record\nattribution, sign-offs and acked-bys.\n"},{"id":"20144","messageId":"Pine.LNX.4.64.0605170725070.10823@g5.osdl.org","threadId":"4166","inReplyTo":"m13bf95ixo.fsf@ebiederm.dsl.xmission.com","subject":"Re: [PATCH] Implement git-quiltimport","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2006-05-17T14:28:06Z","receivedAt":"2006-05-17T14:28:06Z","isPatch":true,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Tue, 16 May 2006, Eric W. Biederman wrote:\n> \n> So what we need for this case really is a way to mark the\n> commit objects in such a way that git-fetch or git-merge\n> would choke on the commit objects and refuse to merge.\n> That way the changes could not easily propagate in the wild.\n> Every user would at least have to specify a non-default option,\n> that Linus at least would never specify.\n\nNo.\n\nWhat we need is for your git-quiltimport to not generate the bogus commits \nin the first place!\n\nMake it a damn error already.\n\nIf you want to have some stupid default to a non-existing and \nnon-supported user, then do\n\n\tgit-quiltimport --author=\"Bad User <baduser@nosuchuser.com>\"\n\nand get over it. Don't make the quiltimport script _default_ to a totally \nidiotic model that will just screw people over.\n\nOr keep it as your personal script. I'm just saying that it should sure as \nhell not be used by any sane person in the format it is in now. Because, \n_by_default_, it now does something insane, which is bad bad bad. Which \nmeans that it shouldn't be merged by Junio.\n\n\t\tLinus\n"},{"id":"20164","messageId":"m1bqtw4hk7.fsf_-_@ebiederm.dsl.xmission.com","threadId":"4166","inReplyTo":"7v1wut2p5z.fsf@assigned-by-dhcp.cox.net","subject":"[PATCH] Implement git-quiltimport (take 2)","fromName":"Eric W. Biederman","fromEmail":"ebiederm@xmission.com","sentAt":"2006-05-17T18:44:40Z","receivedAt":"2006-05-17T18:44:40Z","isPatch":true,"sender":{"key":"ebiederm@xmission.com","avatar":"https://avatars.githubusercontent.com/u/7477136?v=4"},"body":"Importing a quilt patch series into git is not very difficult\nbut parsing the patch descriptions and all of the other\nminutia take a bit of effort to get right, so this automates it.\n\nSince git and quilt complement each other it makes sense\nto make it easy to go back and forth between the two.\n\nIf a patch is encountered that it cannot derive the author\nfrom the user is asked.\n\n---\n\n Documentation/git-quiltimport.txt |   55 +++++++++++++++++++\n Makefile                          |    2 -\n git-quiltimport.sh                |  106 +++++++++++++++++++++++++++++++++++++\n 3 files changed, 162 insertions(+), 1 deletions(-)\n create mode 100644 Documentation/git-quiltimport.txt\n create mode 100644 git-quiltimport.sh\n\n5041c213c1090007dac9c03049c18a1433ccbefc\ndiff --git a/Documentation/git-quiltimport.txt b/Documentation/git-quiltimport.txt\nnew file mode 100644\nindex 0000000..e694537\n--- /dev/null\n+++ b/Documentation/git-quiltimport.txt\n@@ -0,0 +1,55 @@\n+git-quiltimport(1)\n+================\n+\n+NAME\n+----\n+git-quiltimport - Applies a quilt patchset onto the current branch\n+\n+\n+SYNOPSIS\n+--------\n+[verse]\n+'git-quiltimport' [--author <author>] [--patches <dir>]\n+\n+\n+DESCRIPTION\n+-----------\n+Applies a quilt patchset onto the current git branch, preserving\n+the patch boundaries, patch order, and patch descriptions present\n+in the quilt patchset.\n+\n+For each patch the code attempts to extract the author from the \n+patch description.  If that fails it falls back to the author\n+specified with --author.  If the --author flag was not given\n+the patch description is displayed and the user is asked to\n+interactively enter the author of the patch.\n+\n+If a subject is not found in the patch description the patch name is\n+preserved as the 1 line subject in the git description.\n+\n+OPTIONS\n+-------\n+--author Author Name <Author Email>::\n+\tThe author name and email address to use when no author\n+\tinformation can be found in the patch description.\n+\n+--patches <dir>::\n+\tThe directory to find the quilt patches and the\n+\tquilt series file.\n+\n+        The default for the patch directory is patches\n+\tor the value of the $QUILT_PATCHES environment\n+\tvariable.\n+\n+Author\n+------\n+Written by Eric Biederman <ebiederm@lnxi.com>\n+\n+Documentation\n+--------------\n+Documentation by Eric Biederman <ebiederm@lnxi.com>\n+\n+GIT\n+---\n+Part of the gitlink:git[7] suite\n+\ndiff --git a/Makefile b/Makefile\nindex 37fbe78..1f4abe6 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -125,7 +125,7 @@ SCRIPT_SH = \\\n \tgit-applymbox.sh git-applypatch.sh git-am.sh \\\n \tgit-merge.sh git-merge-stupid.sh git-merge-octopus.sh \\\n \tgit-merge-resolve.sh git-merge-ours.sh git-grep.sh \\\n-\tgit-lost-found.sh\n+\tgit-lost-found.sh git-quiltimport.sh\n \n SCRIPT_PERL = \\\n \tgit-archimport.perl git-cvsimport.perl git-relink.perl \\\ndiff --git a/git-quiltimport.sh b/git-quiltimport.sh\nnew file mode 100644\nindex 0000000..be43f9d\n--- /dev/null\n+++ b/git-quiltimport.sh\n@@ -0,0 +1,106 @@\n+#!/bin/sh\n+USAGE='--author <author> --patches </path/to/quilt/patch/directory>'\n+SUBDIRECTORY_ON=Yes\n+. git-sh-setup\n+\n+quilt_author=\"\"\n+while case \"$#\" in 0) break;; esac\n+do\n+\tcase \"$1\" in\n+\t--au=*|--aut=*|--auth=*|--autho=*|--author=*)\n+\t\tquilt_author=$(expr \"$1\" : '-[^=]*\\(.*\\)')\n+\t\tshift\n+\t\t;;\n+\t\n+\t--au|--aut|--auth|--autho|--author)\n+\t\tcase \"$#\" in 1) usage ;; esac\n+\t\tshift\n+\t\tquilt_author=\"$1\"\n+\t\tshift\n+\t\t;;\n+\n+\t--pa=*|--pat=*|--patc=*|--patch=*|--patche=*|--patches=*)\n+\t\tQUILT_PATCHES=$(expr \"$1\" : '-[^=]*\\(.*\\)')\n+\t\tshift\n+\t\t;;\n+\t\n+\t--pa|--pat|--patc|--patch|--patche|--patches)\n+\t\tcase \"$#\" in 1) usage ;; esac\n+\t\tshift\n+\t\tQUILT_PATCHES=\"$1\"\n+\t\tshift\n+\t\t;;\n+\t\n+\t*)\n+\t\tbreak\n+\t\t;;\n+\tesac\n+done\n+\n+# Quilt Author\n+if [ -n \"$quilt_author\" ] ; then\n+\tquilt_author_name=$(expr \"z$quilt_author\" : 'z\\(.*[^ ]\\) *<.*') &&\n+\tquilt_author_email=$(expr \"z$quilt_author\" : '.*<\\([^>]*\\)') &&\n+\ttest '' != \"$quilt_author_name\" &&\n+\ttest '' != \"$quilt_author_email\" ||\n+\tdie \"malformatted --author parameter\"\n+fi\n+\n+# Quilt patch directory\n+: ${QUILT_PATCHES:=patches}\n+if ! [ -d \"$QUILT_PATCHES\" ] ; then\n+\techo \"The \\\"$QUILT_PATCHES\\\" directory does not exist.\"\n+\texit 1\n+fi\n+\n+# Temporay directories\n+tmp_dir=.dotest\n+tmp_msg=\"$tmp_dir/msg\"\n+tmp_patch=\"$tmp_dir/patch\"\n+tmp_info=\"$tmp_dir/info\"\n+\n+\n+# Find the intial commit\n+commit=$(git-rev-parse HEAD)\n+\n+mkdir $tmp_dir || exit 2\n+for patch_name in $(cat \"$QUILT_PATCHES/series\" | grep -v '^#'); do\n+\techo $patch_name\n+\t(cat $QUILT_PATCHES/$patch_name | git-mailinfo \"$tmp_msg\" \"$tmp_patch\" > \"$tmp_info\") || exit 3\n+\t\n+\t# Parse the author information\n+\texport GIT_AUTHOR_NAME=$(sed -ne 's/Author: //p' \"$tmp_info\")\n+\texport GIT_AUTHOR_EMAIL=$(sed -ne 's/Email: //p' \"$tmp_info\")\n+\twhile test -z \"$GIT_AUTHOR_EMAIL\" && test -z \"$GIT_AUTHOR_NAME\" ; do\n+\t\tif [ -n \"$quilt_author\" ] ; then\n+\t\t\tGIT_AUTHOR_NAME=\"$quilt_author_name\";\n+\t\t\tGIT_AUTHOR_EMAIL=\"$quilt_author_email\";\n+\t\telse\n+\t\t\techo \"No author found in $patch_name\";\n+\t\t\techo \"---\"\n+\t\t\tcat $tmp_msg\n+\t\t\techo -n \"Author: \";\n+\t\t\tread patch_author\n+\n+\t\t\techo \"$patch_author\"\n+\n+\t\t\tpatch_author_name=$(expr \"z$patch_author\" : 'z\\(.*[^ ]\\) *<.*') &&\n+\t\t\tpatch_author_email=$(expr \"z$patch_author\" : '.*<\\([^>]*\\)') &&\n+\t\t\ttest '' != \"$patch_author_name\" &&\n+\t\t\ttest '' != \"$patch_author_email\" &&\n+\t\t\tGIT_AUTHOR_NAME=\"$patch_author_name\" &&\n+\t\t\tGIT_AUTHOR_EMAIL=\"$patch_author_email\"\n+\t\tfi\n+\tdone\n+\texport GIT_AUTHOR_DATE=$(sed -ne 's/Date: //p' \"$tmp_info\")\n+\texport SUBJECT=$(sed -ne 's/Subject: //p' \"$tmp_info\")\n+\tif [ -z \"$SUBJECT\" ] ; then\n+\t\tSUBJECT=$(echo $patch_name | sed -e 's/.patch$//')\n+\tfi\n+\n+\tgit-apply --index -C1 \"$tmp_patch\" &&\n+\ttree=$(git-write-tree) &&\n+\tcommit=$((echo \"$SUBJECT\"; echo; cat \"$tmp_msg\") | git-commit-tree $tree -p $commit) &&\n+\tgit-update-ref HEAD $commit || exit 4\n+done\n+rm -rf $tmp_dir || exit 5\n-- \n1.3.2.g2256-dirty\n"},{"id":"20166","messageId":"7vsln8cwn6.fsf@assigned-by-dhcp.cox.net","threadId":"4166","inReplyTo":"m1bqtw4hk7.fsf_-_@ebiederm.dsl.xmission.com","subject":"Re: [PATCH] Implement git-quiltimport (take 2)","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-05-17T18:51:41Z","receivedAt":"2006-05-17T18:51:41Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"ebiederm@xmission.com (Eric W. Biederman) writes:\n\n> Importing a quilt patch series into git is not very difficult\n> but parsing the patch descriptions and all of the other\n> minutia take a bit of effort to get right, so this automates it.\n>\n> Since git and quilt complement each other it makes sense\n> to make it easy to go back and forth between the two.\n>\n> If a patch is encountered that it cannot derive the author\n> from the user is asked.\n\nWhat's the expected workflow for you to work on a 1300 patch\nseries you get from Andrew in the next installment to deal with\n88 unattributed patches?  Answer the question 88 times and make\nsure you get the answers right every time?  Or abort and\nhand-edit them to help mailinfo to notice the correct\nattribution and re-run?\n\nI know I am guilty of suggesting \"going interactive\", but I have\na feeling that having an optional file that maps patch-name to\nauthor might be easier to work with.  If the old patches are\nrecycled in the updated -mm set, you probably can reuse the\nmapping for them, adding entries for newly introduced \"unnamed\"\npatches as needed.\n"},{"id":"20171","messageId":"m1zmhg31cm.fsf@ebiederm.dsl.xmission.com","threadId":"4166","inReplyTo":"7vsln8cwn6.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Implement git-quiltimport (take 2)","fromName":"Eric W. Biederman","fromEmail":"ebiederm@xmission.com","sentAt":"2006-05-17T19:20:09Z","receivedAt":"2006-05-17T19:20:09Z","isPatch":true,"sender":{"key":"ebiederm@xmission.com","avatar":"https://avatars.githubusercontent.com/u/7477136?v=4"},"body":"Junio C Hamano <junkio@cox.net> writes:\n\n> ebiederm@xmission.com (Eric W. Biederman) writes:\n>\n>> Importing a quilt patch series into git is not very difficult\n>> but parsing the patch descriptions and all of the other\n>> minutia take a bit of effort to get right, so this automates it.\n>>\n>> Since git and quilt complement each other it makes sense\n>> to make it easy to go back and forth between the two.\n>>\n>> If a patch is encountered that it cannot derive the author\n>> from the user is asked.\n>\n> What's the expected workflow for you to work on a 1300 patch\n> series you get from Andrew in the next installment to deal with\n> 88 unattributed patches?  Answer the question 88 times and make\n> sure you get the answers right every time?  Or abort and\n> hand-edit them to help mailinfo to notice the correct\n> attribution and re-run?\n\nFor the internal consumption case it isn't a big deal.  I\ncan specify --author with something bogus and it works. \n\nThere are a few tweaks that can be made to git-mailinfo to\nmake it better at parsing information out of patches.  I\ncut the list down to about 49 that way.  I had it all of the\nway down to 1.  But then I realized that the first Singed-off-by\nreally doesn't accurately reflect the author.  I suspect a\nfew of my other teaks are equally suspicious.\n\n> I know I am guilty of suggesting \"going interactive\", but I have\n> a feeling that having an optional file that maps patch-name to\n> author might be easier to work with.  If the old patches are\n> recycled in the updated -mm set, you probably can reuse the\n> mapping for them, adding entries for newly introduced \"unnamed\"\n> patches as needed.\n\nShort of getting the script where it has a sane restart in the\nmiddle mode going interactive and asking questions makes a lot\nof sense.  Especially with smaller trees.\n\nFor Andrews tree before I play anymore with technical solutions I\nneed to talk to Andrew and see if we can improve the situation\nupstream.  Possibly with a quilt-audit script that finds problem\npatches.\n\nEric\n"},{"id":"20181","messageId":"m1r72s2z0u.fsf_-_@ebiederm.dsl.xmission.com","threadId":"4166","inReplyTo":"7vsln8cwn6.fsf@assigned-by-dhcp.cox.net","subject":"[PATCH] Implement a --dry-run option to git-quiltimport","fromName":"Eric W. Biederman","fromEmail":"ebiederm@xmission.com","sentAt":"2006-05-17T20:10:25Z","receivedAt":"2006-05-17T20:10:25Z","isPatch":true,"sender":{"key":"ebiederm@xmission.com","avatar":"https://avatars.githubusercontent.com/u/7477136?v=4"},"body":"\nSince large quilt trees like -mm can easily have patches\nwithout clear authorship information, add a --dry-run\noption to make the problem patches easy to find.\n\n---\n\nThis patch should make it easy to communicate to Andrew\nand others exactly which patches there are problems\nwith, and should make it possible to easily edit\nthose patches before they are imported.\n\n Documentation/git-quiltimport.txt |    8 +++++++-\n git-quiltimport.sh                |   24 ++++++++++++++++++------\n 2 files changed, 25 insertions(+), 7 deletions(-)\n\ncb0ff8090e1492f177a521b01cf987c16b125d81\ndiff --git a/Documentation/git-quiltimport.txt b/Documentation/git-quiltimport.txt\nindex e694537..97f4071 100644\n--- a/Documentation/git-quiltimport.txt\n+++ b/Documentation/git-quiltimport.txt\n@@ -9,7 +9,7 @@ git-quiltimport - Applies a quilt patchs\n SYNOPSIS\n --------\n [verse]\n-'git-quiltimport' [--author <author>] [--patches <dir>]\n+'git-quiltimport' [--dry-run] [--author <author>] [--patches <dir>]\n \n \n DESCRIPTION\n@@ -29,6 +29,12 @@ preserved as the 1 line subject in the g\n \n OPTIONS\n -------\n+--dry-run::\n+\tWalk through the patches in the series and warn\n+\tif we cannot find all of the necessary information to commit\n+\ta patch.  At the time of this writing only missing author\n+\tinformation is warned about.\n+\n --author Author Name <Author Email>::\n \tThe author name and email address to use when no author\n \tinformation can be found in the patch description.\ndiff --git a/git-quiltimport.sh b/git-quiltimport.sh\nindex be43f9d..476e078 100644\n--- a/git-quiltimport.sh\n+++ b/git-quiltimport.sh\n@@ -1,8 +1,9 @@\n #!/bin/sh\n-USAGE='--author <author> --patches </path/to/quilt/patch/directory>'\n+USAGE='--dry-run --author <author> --patches </path/to/quilt/patch/directory>'\n SUBDIRECTORY_ON=Yes\n . git-sh-setup\n \n+dry_run=\"\"\n quilt_author=\"\"\n while case \"$#\" in 0) break;; esac\n do\n@@ -19,6 +20,11 @@ do\n \t\tshift\n \t\t;;\n \n+\t--dry-run)\n+\t\tshift\n+\t\tdry_run=1\n+\t\t;;\n+\n \t--pa=*|--pat=*|--patc=*|--patch=*|--patche=*|--patches=*)\n \t\tQUILT_PATCHES=$(expr \"$1\" : '-[^=]*\\(.*\\)')\n \t\tshift\n@@ -75,8 +81,12 @@ for patch_name in $(cat \"$QUILT_PATCHES/\n \t\tif [ -n \"$quilt_author\" ] ; then\n \t\t\tGIT_AUTHOR_NAME=\"$quilt_author_name\";\n \t\t\tGIT_AUTHOR_EMAIL=\"$quilt_author_email\";\n+\t    \telif [ -n \"$dry_run\" ]; then\n+\t\t\techo \"No author found in $patch_name\" >&2;\n+\t\t\tGIT_AUTHOR_NAME=\"dry-run-not-found\";\n+\t\t\tGIT_AUTHOR_EMAIL=\"dry-run-not-found\";\n \t\telse\n-\t\t\techo \"No author found in $patch_name\";\n+\t\t\techo \"No author found in $patch_name\" >&2;\n \t\t\techo \"---\"\n \t\t\tcat $tmp_msg\n \t\t\techo -n \"Author: \";\n@@ -98,9 +108,11 @@ for patch_name in $(cat \"$QUILT_PATCHES/\n \t\tSUBJECT=$(echo $patch_name | sed -e 's/.patch$//')\n \tfi\n \n-\tgit-apply --index -C1 \"$tmp_patch\" &&\n-\ttree=$(git-write-tree) &&\n-\tcommit=$((echo \"$SUBJECT\"; echo; cat \"$tmp_msg\") | git-commit-tree $tree -p $commit) &&\n-\tgit-update-ref HEAD $commit || exit 4\n+\tif [ -z \"$dry_run\" ] ; then\n+\t\tgit-apply --index -C1 \"$tmp_patch\" &&\n+\t\ttree=$(git-write-tree) &&\n+\t\tcommit=$((echo \"$SUBJECT\"; echo; cat \"$tmp_msg\") | git-commit-tree $tree -p $commit) &&\n+\t\tgit-update-ref HEAD $commit || exit 4\n+\tfi\t\n done\n rm -rf $tmp_dir || exit 5\n-- \n1.3.2.g5041c-dirty\n"},{"id":"20195","messageId":"7vy7x09qet.fsf@assigned-by-dhcp.cox.net","threadId":"4166","inReplyTo":"m1zmhg31cm.fsf@ebiederm.dsl.xmission.com","subject":"Re: [PATCH] Implement git-quiltimport (take 2)","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-05-17T23:34:34Z","receivedAt":"2006-05-17T23:34:34Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"ebiederm@xmission.com (Eric W. Biederman) writes:\n\n> Junio C Hamano <junkio@cox.net> writes:\n>\n>> What's the expected workflow for you to work on a 1300 patch\n>> series you get from Andrew in the next installment to deal with\n>> 88 unattributed patches?  Answer the question 88 times and make\n>> sure you get the answers right every time?  Or abort and\n>> hand-edit them to help mailinfo to notice the correct\n>> attribution and re-run?\n>\n> For the internal consumption case it isn't a big deal.  I\n> can specify --author with something bogus and it works. \n\nYes.\n\n>> I know I am guilty of suggesting \"going interactive\", but I have\n>> a feeling that having an optional file that maps patch-name to\n>> author might be easier to work with.  If the old patches are\n>> recycled in the updated -mm set, you probably can reuse the\n>> mapping for them, adding entries for newly introduced \"unnamed\"\n>> patches as needed.\n>\n> Short of getting the script where it has a sane restart in the\n> middle mode going interactive and asking questions makes a lot\n> of sense.  Especially with smaller trees.\n\nYes perhaps on smaller trees, but that does not mean much.  For\nsmaller trees and/or smaller patch series almost anything would\ndo.\n\nHow about doing something like this, so that the user can record\nthe fixup information, especially with --dry-run patch?  Then\nthe next round from the updated -mm tree the user would not have\nto retype them again (\"then..fi\" part should be indented in the\nfinal version, but I did not want indentation changes to\ndistract you):\n\n \t# Parse the author information\n \texport GIT_AUTHOR_NAME=$(sed -ne 's/Author: //p' \"$tmp_info\")\n \texport GIT_AUTHOR_EMAIL=$(sed -ne 's/Email: //p' \"$tmp_info\")\n+\talready_tried_fixup=\n \twhile test -z \"$GIT_AUTHOR_EMAIL\" && test -z \"$GIT_AUTHOR_NAME\" ; do\n \t\tif [ -n \"$quilt_author\" ] ; then\n \t\t\tGIT_AUTHOR_NAME=\"$quilt_author_name\";\n \t\t\tGIT_AUTHOR_EMAIL=\"$quilt_author_email\";\n \t\telse\n+\t\t\tif test -z \"$already_tried_fixup\"\n+\t\t\tthen\n+\t\t\t\tpatch_author=`grep author-fixup \"$patch_name\"`\n+\t\t\t\talready_tried_fixup=t\n+\t\t\tfi\n+\t\t\tif test -z \"$patch_author\"\n+\t\t\tthen\n \t\t\techo \"No author found in $patch_name\";\n \t\t\techo \"---\"\n \t\t\tcat $tmp_msg\n \t\t\techo -n \"Author: \";\n \t\t\tread patch_author\n+\t\t\tfi\n \n \t\t\techo \"$patch_author\"\n\n> For Andrews tree before I play anymore with technical solutions I\n> need to talk to Andrew and see if we can improve the situation\n> upstream.  Possibly with a quilt-audit script that finds problem\n> patches.\n\nYes, that sounds very sensible.\n"},{"id":"20223","messageId":"m1ejyr38xx.fsf@ebiederm.dsl.xmission.com","threadId":"4166","inReplyTo":"7vy7x09qet.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Implement git-quiltimport (take 2)","fromName":"Eric W. Biederman","fromEmail":"ebiederm@xmission.com","sentAt":"2006-05-18T10:48:26Z","receivedAt":"2006-05-18T10:48:26Z","isPatch":true,"sender":{"key":"ebiederm@xmission.com","avatar":"https://avatars.githubusercontent.com/u/7477136?v=4"},"body":"Junio C Hamano <junkio@cox.net> writes:\n\n> ebiederm@xmission.com (Eric W. Biederman) writes:\n>\n>> Junio C Hamano <junkio@cox.net> writes:\n>>\n>>> What's the expected workflow for you to work on a 1300 patch\n>>> series you get from Andrew in the next installment to deal with\n>>> 88 unattributed patches?  Answer the question 88 times and make\n>>> sure you get the answers right every time?  Or abort and\n>>> hand-edit them to help mailinfo to notice the correct\n>>> attribution and re-run?\n>>\n>> For the internal consumption case it isn't a big deal.  I\n>> can specify --author with something bogus and it works. \n>\n> Yes.\n>\n>>> I know I am guilty of suggesting \"going interactive\", but I have\n>>> a feeling that having an optional file that maps patch-name to\n>>> author might be easier to work with.  If the old patches are\n>>> recycled in the updated -mm set, you probably can reuse the\n>>> mapping for them, adding entries for newly introduced \"unnamed\"\n>>> patches as needed.\n>>\n>> Short of getting the script where it has a sane restart in the\n>> middle mode going interactive and asking questions makes a lot\n>> of sense.  Especially with smaller trees.\n>\n> Yes perhaps on smaller trees, but that does not mean much.  For\n> smaller trees and/or smaller patch series almost anything would\n> do.\n\nYes, a smaller patch series, that is what I meant.\nMost quilt trees that I know about are in needed small.\n\nAndrews is the only one I know of that has gets as far as sucking in\nother quilt trees.\n\n> How about doing something like this, so that the user can record\n> the fixup information, especially with --dry-run patch?  Then\n> the next round from the updated -mm tree the user would not have\n> to retype them again (\"then..fi\" part should be indented in the\n> final version, but I did not want indentation changes to\n> distract you):\n\nThis might be a sane work flow.  My imagination actually had\nthe user making a copy of the quilt tree and editing it by\nhand.  My --dry-run doesn't ask the question it just throws\nerrors so --dry-run isn't quite the right name.\n\nSo I guess with something like --dry-run there isn't a restart\nproblem.  The question is if we don't edit the patches themselves\nwhere do we put your author-fixup tag?  .dotest? \n\nEric\n"},{"id":"20287","messageId":"m164k21gpm.fsf@ebiederm.dsl.xmission.com","threadId":"4166","inReplyTo":"7vy7x09qet.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Implement git-quiltimport (take 2)","fromName":"Eric W. Biederman","fromEmail":"ebiederm@xmission.com","sentAt":"2006-05-19T09:55:49Z","receivedAt":"2006-05-19T09:55:49Z","isPatch":true,"sender":{"key":"ebiederm@xmission.com","avatar":"https://avatars.githubusercontent.com/u/7477136?v=4"},"body":"Junio C Hamano <junkio@cox.net> writes:\n\n>> For Andrews tree before I play anymore with technical solutions I\n>> need to talk to Andrew and see if we can improve the situation\n>> upstream.  Possibly with a quilt-audit script that finds problem\n>> patches.\n>\n> Yes, that sounds very sensible.\n\nAnyway I had a first pass conversation with Andrew and it looks like\nhe will start addressing the problem patches there.  So things\nshould be resolvable.\n\nThe final piece on my agenda for getting the proper authors from\nthe -mm tree is coping with Andrew's git patches.  They have enough\ninformation to determine the Author but they are really several\ndifferent patches.  Ideally I will be able recognize they are\nperforming a pull from a git repository and get the same results.\n\nOtherwise some other trick will be necessary.\n\nEric\n"},{"id":"20309","messageId":"20060519235825.GA3289@kroah.com","threadId":"4166","inReplyTo":"m1ejyr38xx.fsf@ebiederm.dsl.xmission.com","subject":"Re: [PATCH] Implement git-quiltimport (take 2)","fromName":"Greg KH","fromEmail":"greg@kroah.com","sentAt":"2006-05-19T23:58:25Z","receivedAt":"2006-05-19T23:58:25Z","isPatch":true,"sender":{"key":"greg@kroah.com","avatar":"https://gravatar.com/avatar/5bb5aa0cc2e01c00ec899d11130c07796bc186e465bae57bc34873b13b72c7c8?d=mp&s=160"},"body":"On Thu, May 18, 2006 at 04:48:26AM -0600, Eric W. Biederman wrote:\n> Junio C Hamano <junkio@cox.net> writes:\n> \n> > ebiederm@xmission.com (Eric W. Biederman) writes:\n> >\n> >> Junio C Hamano <junkio@cox.net> writes:\n> >>\n> >>> What's the expected workflow for you to work on a 1300 patch\n> >>> series you get from Andrew in the next installment to deal with\n> >>> 88 unattributed patches?  Answer the question 88 times and make\n> >>> sure you get the answers right every time?  Or abort and\n> >>> hand-edit them to help mailinfo to notice the correct\n> >>> attribution and re-run?\n> >>\n> >> For the internal consumption case it isn't a big deal.  I\n> >> can specify --author with something bogus and it works. \n> >\n> > Yes.\n> >\n> >>> I know I am guilty of suggesting \"going interactive\", but I have\n> >>> a feeling that having an optional file that maps patch-name to\n> >>> author might be easier to work with.  If the old patches are\n> >>> recycled in the updated -mm set, you probably can reuse the\n> >>> mapping for them, adding entries for newly introduced \"unnamed\"\n> >>> patches as needed.\n> >>\n> >> Short of getting the script where it has a sane restart in the\n> >> middle mode going interactive and asking questions makes a lot\n> >> of sense.  Especially with smaller trees.\n> >\n> > Yes perhaps on smaller trees, but that does not mean much.  For\n> > smaller trees and/or smaller patch series almost anything would\n> > do.\n> \n> Yes, a smaller patch series, that is what I meant.\n> Most quilt trees that I know about are in needed small.\n\n$ quilt series | wc -l\n207\n\nAnd that is about \"normal\" for me.  Sometimes it grows to about 500+\npatches, but that only happens when there's a longer kernel release\ncycle.\n\nAnother tree that I work on all the time is about 700+ patches, and yet\nanother 2000+.  So you might re-evaluate your statement about \"small\"\nquilt series :)\n\nIn looking at your script, it doesn't seem to be able to handle patches\nin quilt that are in mbox format.  Any thoughts to allow this to handle\nthe attribution properly?\n\nRight now my development flow has me converting my quilt tree to one big\nmbox file and then using 'git applymbox' to import it before asking\nLinus to pull from it.\n\nWith your script I could skip at least one step, which would save me\nsome time...\n\nthanks,\n\ngreg k-h\n"},{"id":"20315","messageId":"m1ac9dv2ld.fsf@ebiederm.dsl.xmission.com","threadId":"4166","inReplyTo":"20060519235825.GA3289@kroah.com","subject":"Re: [PATCH] Implement git-quiltimport (take 2)","fromName":"Eric W. Biederman","fromEmail":"ebiederm@xmission.com","sentAt":"2006-05-20T02:42:38Z","receivedAt":"2006-05-20T02:42:38Z","isPatch":true,"sender":{"key":"ebiederm@xmission.com","avatar":"https://avatars.githubusercontent.com/u/7477136?v=4"},"body":"Greg KH <greg@kroah.com> writes:\n\n> On Thu, May 18, 2006 at 04:48:26AM -0600, Eric W. Biederman wrote:\n>> \n>> Yes, a smaller patch series, that is what I meant.\n>> Most quilt trees that I know about are  small.\n>\n> $ quilt series | wc -l\n> 207\n>\n> And that is about \"normal\" for me.  Sometimes it grows to about 500+\n> patches, but that only happens when there's a longer kernel release\n> cycle.\n>\n> Another tree that I work on all the time is about 700+ patches, and yet\n> another 2000+.  So you might re-evaluate your statement about \"small\"\n> quilt series :)\n\nSure.  On fixing the upstream attribution issue you and Andi Kleen \nlook like people that are worth talking to, as there were several\npatches in Andrews tree from both of you that were lacking attribution.\n\n> In looking at your script, it doesn't seem to be able to handle patches\n> in quilt that are in mbox format.  Any thoughts to allow this to handle\n> the attribution properly?\n\nMbox format but one patch per file, or multiple patches in one mbox file?\n\nIf it is one patch per file but with mbox headers, it is relatively\nsimple to teach git-mailinfo to parse things in a slightly more intelligent\nway.  I played with that but I didn't have any patches that helped with.\n\n> Right now my development flow has me converting my quilt tree to one big\n> mbox file and then using 'git applymbox' to import it before asking\n> Linus to pull from it.\n>\n> With your script I could skip at least one step, which would save me\n> some time...\n\nSure. That is the point of making it generic.\n\nEric\n"},{"id":"20339","messageId":"20060520213257.GH24672@kroah.com","threadId":"4166","inReplyTo":"m1ac9dv2ld.fsf@ebiederm.dsl.xmission.com","subject":"Re: [PATCH] Implement git-quiltimport (take 2)","fromName":"Greg KH","fromEmail":"greg@kroah.com","sentAt":"2006-05-20T21:32:57Z","receivedAt":"2006-05-20T21:32:57Z","isPatch":true,"sender":{"key":"greg@kroah.com","avatar":"https://gravatar.com/avatar/5bb5aa0cc2e01c00ec899d11130c07796bc186e465bae57bc34873b13b72c7c8?d=mp&s=160"},"body":"On Fri, May 19, 2006 at 08:42:38PM -0600, Eric W. Biederman wrote:\n> Greg KH <greg@kroah.com> writes:\n> \n> > On Thu, May 18, 2006 at 04:48:26AM -0600, Eric W. Biederman wrote:\n> >> \n> >> Yes, a smaller patch series, that is what I meant.\n> >> Most quilt trees that I know about are  small.\n> >\n> > $ quilt series | wc -l\n> > 207\n> >\n> > And that is about \"normal\" for me.  Sometimes it grows to about 500+\n> > patches, but that only happens when there's a longer kernel release\n> > cycle.\n> >\n> > Another tree that I work on all the time is about 700+ patches, and yet\n> > another 2000+.  So you might re-evaluate your statement about \"small\"\n> > quilt series :)\n> \n> Sure.  On fixing the upstream attribution issue you and Andi Kleen \n> look like people that are worth talking to, as there were several\n> patches in Andrews tree from both of you that were lacking attribution.\n\nYes, I know I don't put any headers on patches I create until they are\nready to be sent upstream to Linus.  I'll try to be better about that in\nthe future, sorry.\n\n> > In looking at your script, it doesn't seem to be able to handle patches\n> > in quilt that are in mbox format.  Any thoughts to allow this to handle\n> > the attribution properly?\n> \n> Mbox format but one patch per file, or multiple patches in one mbox file?\n\nThe patches are already in mbox format in each file, but I dump them all\ntogether into one big one, to preserve the proper order as defined in\nthe quilt series file so that git gets it right.\n\n> If it is one patch per file but with mbox headers, it is relatively\n> simple to teach git-mailinfo to parse things in a slightly more intelligent\n> way.  I played with that but I didn't have any patches that helped with.\n\nHm, I'll try playing with that.\n\nIf you want, just grab my quilt trees from kernel.org and play with\nthem, they should all be in mbox format for the individual patches (with\nsome exceptions as noted above, just kick me about them to get me to fix\nthem...)\n\nthanks,\n\ngreg k-h\n"},{"id":"20354","messageId":"m1fyj4qkm2.fsf@ebiederm.dsl.xmission.com","threadId":"4166","inReplyTo":"20060520213257.GH24672@kroah.com","subject":"Re: [PATCH] Implement git-quiltimport (take 2)","fromName":"Eric W. Biederman","fromEmail":"ebiederm@xmission.com","sentAt":"2006-05-21T00:36:53Z","receivedAt":"2006-05-21T00:36:53Z","isPatch":true,"sender":{"key":"ebiederm@xmission.com","avatar":"https://avatars.githubusercontent.com/u/7477136?v=4"},"body":"Greg KH <greg@kroah.com> writes:\n\n> On Fri, May 19, 2006 at 08:42:38PM -0600, Eric W. Biederman wrote:\n>\n>> If it is one patch per file but with mbox headers, it is relatively\n>> simple to teach git-mailinfo to parse things in a slightly more intelligent\n>> way.  I played with that but I didn't have any patches that helped with.\n>\n> Hm, I'll try playing with that.\n>\n> If you want, just grab my quilt trees from kernel.org and play with\n> them, they should all be in mbox format for the individual patches (with\n> some exceptions as noted above, just kick me about them to get me to fix\n> them...)\n\nSo I just grabbed the gregkh-2.6 set of patches and with an unmodified\ngit-mailinfo I only have problems with the following patches:\n\tgregkh/gkh-version.patch\n\tgregkh/sysfs-test.patch\n\tgregkh/gregkh-usb-minors.patch\n\tgregkh/gregkh-debugfs_example.patch\n\tgregkh/gpl_future-test.patch\n\tusb/usb-gotemp.patch\n\nNone of which actually have from headers.\n\nCurrently git-mailinfo distinguishes headers and non-headers by the\npresence of the first blank line.  So it seems to work just fine on\nmbox format patches.\n\nEric\n"},{"id":"20355","messageId":"7v8xow1a6r.fsf@assigned-by-dhcp.cox.net","threadId":"4166","inReplyTo":"m1fyj4qkm2.fsf@ebiederm.dsl.xmission.com","subject":"Re: [PATCH] Implement git-quiltimport (take 2)","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-05-21T00:41:16Z","receivedAt":"2006-05-21T00:41:16Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"ebiederm@xmission.com (Eric W. Biederman) writes:\n\n> Currently git-mailinfo distinguishes headers and non-headers by the\n> presence of the first blank line.  So it seems to work just fine on\n> mbox format patches.\n\nThe program was designed to be fed one e-mail a time (the\nintended way for it to work is that a wrapper script uses\ngit-mailsplit to break mbox up and call git-mailinfo one by\none).\n"},{"id":"20358","messageId":"m13bf4qjjv.fsf@ebiederm.dsl.xmission.com","threadId":"4166","inReplyTo":"7v8xow1a6r.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Implement git-quiltimport (take 2)","fromName":"Eric W. Biederman","fromEmail":"ebiederm@xmission.com","sentAt":"2006-05-21T00:59:48Z","receivedAt":"2006-05-21T00:59:48Z","isPatch":true,"sender":{"key":"ebiederm@xmission.com","avatar":"https://avatars.githubusercontent.com/u/7477136?v=4"},"body":"Junio C Hamano <junkio@cox.net> writes:\n\n> ebiederm@xmission.com (Eric W. Biederman) writes:\n>\n>> Currently git-mailinfo distinguishes headers and non-headers by the\n>> presence of the first blank line.  So it seems to work just fine on\n>> mbox format patches.\n>\n> The program was designed to be fed one e-mail a time (the\n> intended way for it to work is that a wrapper script uses\n> git-mailsplit to break mbox up and call git-mailinfo one by\n> one).\n\nIn this case what is meant is a leading \"From \" header (no colon)\nat the start of the patch.\n\nWhere git-mailinfo is likely to fall down is more in the quilt\npatches from Andi Kleen. If you look at my quoted patch header below\nyou will see the subject is a plain line, followed by a space followed\nby a from.  On this example git-mailinfo works (except for picking up\nthe subject) but it appears to be a fluke.\n\n>From x86_64-mm-add-abilty-to-enable-disable-nmi-watchdog-from-sysfs.patch:\n\n> Add abilty to enable/disable nmi watchdog with sysctl\n> \n> From: dzickus <dzickus@redhat.com>\n> \n> Adds a new /proc/sys/kernel/nmi call that will enable/disable the nmi\n> watchdog.\n> \n> Signed-off-by:  Don Zickus <dzickus@redhat.com>\n> Signed-off-by: Andi Kleen <ak@suse.de>\n> \n> ---\n>  arch/i386/kernel/nmi.c   |   52 +++++++++++++++++++++++++++++++++++++++++++++++\n>  arch/x86_64/kernel/nmi.c |   48 +++++++++++++++++++++++++++++++++++++++++++\n>  include/asm-i386/nmi.h   |    1\n>  include/asm-x86_64/nmi.h |    1\n>  include/linux/sysctl.h   |    1\n>  kernel/sysctl.c          |   11 +++++++++\n>  6 files changed, 114 insertions(+)\n> \n> Index: linux/arch/i386/kernel/nmi.c\n\n\nEric\n"},{"id":"20360","messageId":"7v4pzk196p.fsf@assigned-by-dhcp.cox.net","threadId":"4166","inReplyTo":"m13bf4qjjv.fsf@ebiederm.dsl.xmission.com","subject":"Re: [PATCH] Implement git-quiltimport (take 2)","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-05-21T01:02:54Z","receivedAt":"2006-05-21T01:02:54Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"ebiederm@xmission.com (Eric W. Biederman) writes:\n\n> Where git-mailinfo is likely to fall down is more in the quilt\n> patches from Andi Kleen. If you look at my quoted patch header below\n> you will see the subject is a plain line, followed by a space followed\n> by a from.  On this example git-mailinfo works (except for picking up\n> the subject) but it appears to be a fluke.\n>\n> From x86_64-mm-add-abilty-to-enable-disable-nmi-watchdog-from-sysfs.patch:\n>\n\nYeah, that's right, but in a real mailbox wouldn't that line be\nprefixed with a '>' ;-)?\n"},{"id":"20363","messageId":"m1u07kp47t.fsf@ebiederm.dsl.xmission.com","threadId":"4166","inReplyTo":"7v4pzk196p.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Implement git-quiltimport (take 2)","fromName":"Eric W. Biederman","fromEmail":"ebiederm@xmission.com","sentAt":"2006-05-21T01:16:22Z","receivedAt":"2006-05-21T01:16:22Z","isPatch":true,"sender":{"key":"ebiederm@xmission.com","avatar":"https://avatars.githubusercontent.com/u/7477136?v=4"},"body":"Junio C Hamano <junkio@cox.net> writes:\n\n> ebiederm@xmission.com (Eric W. Biederman) writes:\n>\n>> Where git-mailinfo is likely to fall down is more in the quilt\n>> patches from Andi Kleen. If you look at my quoted patch header below\n>> you will see the subject is a plain line, followed by a space followed\n>> by a from.  On this example git-mailinfo works (except for picking up\n>> the subject) but it appears to be a fluke.\n>>\n>> From x86_64-mm-add-abilty-to-enable-disable-nmi-watchdog-from-sysfs.patch:\n>>\n>\n> Yeah, that's right, but in a real mailbox wouldn't that line be\n> prefixed with a '>' ;-)?\n\nThat last from line was my attribution.  The first quoted line\nwas the first line of the patch.  In this context that was probably\na little confusing.\n\nEric\n"},{"id":"21063","messageId":"20060601192318.GC3329@kroah.com","threadId":"4166","inReplyTo":"m1fyj4qkm2.fsf@ebiederm.dsl.xmission.com","subject":"Re: [PATCH] Implement git-quiltimport (take 2)","fromName":"Greg KH","fromEmail":"greg@kroah.com","sentAt":"2006-06-01T19:23:18Z","receivedAt":"2006-06-01T19:23:18Z","isPatch":true,"sender":{"key":"greg@kroah.com","avatar":"https://gravatar.com/avatar/5bb5aa0cc2e01c00ec899d11130c07796bc186e465bae57bc34873b13b72c7c8?d=mp&s=160"},"body":"On Sat, May 20, 2006 at 06:36:53PM -0600, Eric W. Biederman wrote:\n> Greg KH <greg@kroah.com> writes:\n> \n> > On Fri, May 19, 2006 at 08:42:38PM -0600, Eric W. Biederman wrote:\n> >\n> >> If it is one patch per file but with mbox headers, it is relatively\n> >> simple to teach git-mailinfo to parse things in a slightly more intelligent\n> >> way.  I played with that but I didn't have any patches that helped with.\n> >\n> > Hm, I'll try playing with that.\n> >\n> > If you want, just grab my quilt trees from kernel.org and play with\n> > them, they should all be in mbox format for the individual patches (with\n> > some exceptions as noted above, just kick me about them to get me to fix\n> > them...)\n> \n> So I just grabbed the gregkh-2.6 set of patches and with an unmodified\n> git-mailinfo I only have problems with the following patches:\n> \tgregkh/gkh-version.patch\n> \tgregkh/sysfs-test.patch\n> \tgregkh/gregkh-usb-minors.patch\n> \tgregkh/gregkh-debugfs_example.patch\n> \tgregkh/gpl_future-test.patch\n> \tusb/usb-gotemp.patch\n> \n> None of which actually have from headers.\n\nOops, sorry for the delay.  I've now fixed up these patches (the ones in\nthe gregkh/ directory are not ever going to be sent upstream, that's\nwhy they were missing headers, same for the gotemp driver.)\n\nthanks,\n\ngreg k-h\n"},{"id":"21071","messageId":"m1y7wg5rrv.fsf@ebiederm.dsl.xmission.com","threadId":"4166","inReplyTo":"20060601192318.GC3329@kroah.com","subject":"Re: [PATCH] Implement git-quiltimport (take 2)","fromName":"Eric W. Biederman","fromEmail":"ebiederm@xmission.com","sentAt":"2006-06-02T00:24:04Z","receivedAt":"2006-06-02T00:24:04Z","isPatch":true,"sender":{"key":"ebiederm@xmission.com","avatar":"https://avatars.githubusercontent.com/u/7477136?v=4"},"body":"Greg KH <greg@kroah.com> writes:\n\n>> \n>> So I just grabbed the gregkh-2.6 set of patches and with an unmodified\n>> git-mailinfo I only have problems with the following patches:\n>> \tgregkh/gkh-version.patch\n>> \tgregkh/sysfs-test.patch\n>> \tgregkh/gregkh-usb-minors.patch\n>> \tgregkh/gregkh-debugfs_example.patch\n>> \tgregkh/gpl_future-test.patch\n>> \tusb/usb-gotemp.patch\n>> \n>> None of which actually have from headers.\n>\n> Oops, sorry for the delay.  I've now fixed up these patches (the ones in\n> the gregkh/ directory are not ever going to be sent upstream, that's\n> why they were missing headers, same for the gotemp driver.)\n\nNo problem. I'm mostly on vacation at the moment.\n\nThings like usb/usb-gotemp.path have been sucked into the -mm\ntree.  So sometimes these things after being published do wind up down stream...\n\n\nEric\n"}]}