Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> --- 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 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html