From: Uwe Kleine-König Date: Tue, 23 Dec 2008 14:32:22 GMT Subject: [PATCH TOPGIT] tg export: implement skipping empty patches for collapse driver Message-ID: <1230042744-24675-1-git-send-email-u.kleine-koenig@pengutronix.de> In-Reply-To: <20081223143035.GA24087@cassiopeia.tralala> Signed-off-by: Uwe Kleine-König --- 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" } -- 1.5.6.5