From 4eec290bb9ef01624d8ddd72959a93d046d6c7a3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Wed, 26 Nov 2008 13:13:00 +0100 Subject: [PATCH] tg-export: implement skipping empty patches for quilt mode MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit addionally fix the README item for skipping the export of empty patches not to need an option (-n) as this should be the default. Signed-off-by: Uwe Kleine-König Signed-off-by: martin f. krafft --- README | 2 +- tg-export.sh | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/README b/README index 5bfe3ee..aa1f21d 100644 --- a/README +++ b/README @@ -414,7 +414,7 @@ tg export TODO: Make stripping of non-essential headers configurable TODO: Make stripping of [PATCH] and other prefixes configurable TODO: --mbox option for other mode of operation - TODO: -n option to prevent exporting of empty patches + TODO: prevent exporting of empty patches by the collapse driver TODO: -a option to export all branches TODO: For quilt exporting, use a temporary branch and remove it when done - this would allow producing conflict-less series diff --git a/tg-export.sh b/tg-export.sh index 90a76d5..afb6f95 100644 --- a/tg-export.sh +++ b/tg-export.sh @@ -140,10 +140,14 @@ quilt() return fi - echo "Exporting $_dep" - mkdir -p "$(dirname "$filename")" - $tg patch "$_dep" >"$filename" - echo "$_dep.diff -p1" >>"$output/series" + if branch_empty "$_dep"; then + echo "Skip empty patch $_dep"; + else + echo "Exporting $_dep" + mkdir -p "$(dirname "$filename")" + $tg patch "$_dep" >"$filename" + echo "$_dep.diff -p1" >>"$output/series" + fi } -- 2.30.2