From 7e24a4aafda160b0715436034d5c8bf6f62ad8bd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Fri, 19 Dec 2008 22:18:37 +0100 Subject: [PATCH] tg export (collapse): implement skipping empty patches MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Uwe Kleine-König Signed-off-by: martin f. krafft --- README | 1 - tg-export.sh | 10 +++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README b/README index c19985f..8be0d17 100644 --- a/README +++ b/README @@ -414,7 +414,6 @@ 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: 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 afb6f95..95aa346 100644 --- a/tg-export.sh +++ b/tg-export.sh @@ -91,9 +91,13 @@ collapsed_commit() $(for p in $parent; do echo -p $p; done))" fi - (printf '%s\n\n' "$SUBJECT"; cat "$playground/^msg") | - git stripspace | - git commit-tree "$(pretty_tree "$name")" -p "$parent" + if branch_empty "$name"; then + echo "$parent"; + else + (printf '%s\n\n' "$SUBJECT"; cat "$playground/^msg") | + git stripspace | + git commit-tree "$(pretty_tree "$name")" -p "$parent" + fi; echo "$name" >>"$playground/^ticker" } -- 2.30.2