{"thread":{"id":"16476","subject":"[PATCH] tg export: implement skipping empty patches for quilt mode","startedAt":"2008-11-26T12:13:00Z","lastAt":"2008-11-26T21:19:19Z","messageCount":3,"participants":["Uwe Kleine-König","martin f krafft"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"96539","messageId":"1227701580-9762-1-git-send-email-u.kleine-koenig@pengutronix.de","threadId":"16476","inReplyTo":null,"subject":"[PATCH] tg export: implement skipping empty patches for quilt mode","fromName":"Uwe Kleine-König","fromEmail":"u.kleine-koenig@pengutronix.de","sentAt":"2008-11-26T12:13:00Z","receivedAt":"2008-11-26T12:13:00Z","isPatch":true,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"addionally fix the README item for skipping the export of empty patches\nnot to need an option (-n) as this should be the default.\n\nSigned-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>\n---\n README       |    2 +-\n tg-export.sh |   12 ++++++++----\n 2 files changed, 9 insertions(+), 5 deletions(-)\n\ndiff --git a/README b/README\nindex 5bfe3ee..9b92d43 100644\n--- a/README\n+++ b/README\n@@ -414,7 +414,7 @@ tg export\n \tTODO: Make stripping of non-essential headers configurable\n \tTODO: Make stripping of [PATCH] and other prefixes configurable\n \tTODO: --mbox option for other mode of operation\n-\tTODO: -n option to prevent exporting of empty patches\n+\tTODO: prevent exporting of empty patches\n \tTODO: -a option to export all branches\n \tTODO: For quilt exporting, use a temporary branch and remove it when\n \t      done - this would allow producing conflict-less series\ndiff --git a/tg-export.sh b/tg-export.sh\nindex 52af88d..f133fb8 100644\n--- a/tg-export.sh\n+++ b/tg-export.sh\n@@ -140,10 +140,14 @@ quilt()\n \t\treturn\n \tfi\n \n-\techo \"Exporting $_dep\"\n-\tmkdir -p \"$(dirname \"$filename\")\"\n-\t$tg patch \"$_dep\" >\"$filename\"\n-\techo \"$_dep.diff -p1\" >>\"$output/series\"\n+\tif branch_empty \"$_dep\"; then\n+\t\techo \"Skip empty patch $_dep\";\n+\telse\n+\t\techo \"Exporting $_dep\"\n+\t\tmkdir -p \"$(dirname \"$filename\")\"\n+\t\t$tg patch \"$_dep\" >\"$filename\"\n+\t\techo \"$_dep.diff -p1\" >>\"$output/series\"\n+\tfi\n }\n \n \n-- \n1.5.6.5\n"},{"id":"96576","messageId":"20081126203959.GB31563@piper.oerlikon.madduck.net","threadId":"16476","inReplyTo":"1227701580-9762-1-git-send-email-u.kleine-koenig@pengutronix.de","subject":"Re: [PATCH] tg export: implement skipping empty patches for quilt mode","fromName":"martin f krafft","fromEmail":"madduck@debian.org","sentAt":"2008-11-26T20:39:59Z","receivedAt":"2008-11-26T20:39:59Z","isPatch":true,"sender":{"key":"madduck@debian.org","avatar":null},"body":"also sprach Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [2008.11.26.1313 +0100]:\n> addionally fix the README item for skipping the export of empty patches\n> not to need an option (-n) as this should be the default.\n[...]\n> -\tTODO: -n option to prevent exporting of empty patches\n> +\tTODO: prevent exporting of empty patches\n\nIs it still a TODO? Looks like your patch fixes it, no?\n\n-- \n .''`.   martin f. krafft <madduck@d.o>      Related projects:\n: :'  :  proud Debian developer               http://debiansystem.info\n`. `'`   http://people.debian.org/~madduck    http://vcs-pkg.org\n  `-  Debian - when you have better things to do than fixing systems\n \n\"the difference between genius and stupidity\n is that genius has it's limits.\"\n                                                    -- albert einstein\n"},{"id":"96581","messageId":"20081126211919.GA22474@strlen.de","threadId":"16476","inReplyTo":"20081126203959.GB31563@piper.oerlikon.madduck.net","subject":"Re: [PATCH] tg export: implement skipping empty patches for quilt mode","fromName":"Uwe Kleine-König","fromEmail":"ukleinek@strlen.de","sentAt":"2008-11-26T21:19:19Z","receivedAt":"2008-11-26T21:19:19Z","isPatch":true,"sender":{"key":"ukleinek@strlen.de","avatar":"https://gravatar.com/avatar/71e008a89bd4c9d95c03e4823fa14b01e7f658bfc746c8a735286b945417f2d6?d=mp&s=160"},"body":"Hi,\n\nOn Wed, Nov 26, 2008 at 09:39:59PM +0100, martin f krafft wrote:\n> also sprach Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [2008.11.26.1313 +0100]:\n> > addionally fix the README item for skipping the export of empty patches\n> > not to need an option (-n) as this should be the default.\n> [...]\n> > -\tTODO: -n option to prevent exporting of empty patches\n> > +\tTODO: prevent exporting of empty patches\n> \n> Is it still a TODO? Looks like your patch fixes it, no?\nNo, it's still a TODO for the collapse driver.\n\nBest regards\nUwe\n"}]}