From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: martin f krafft <madduck@debian.org>
Cc: git@vger.kernel.org, "Uwe Kleine-König" <ukleinek@strlen.de>
Subject: [PATCH] tg export: implement skipping empty patches for quilt mode
Date: Wed, 26 Nov 2008 13:12:32 +0100 [thread overview]
Message-ID: <1227701552-9702-1-git-send-email-u.kleine-koenig@pengutronix.de> (raw)
In-Reply-To: <20081126102507.GA29100@piper.oerlikon.madduck.net>
From: Uwe Kleine-König <ukleinek@strlen.de>
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 <u.kleine-koenig@pengutronix.de>
---
README | 2 +-
tg-export.sh | 12 ++++++++----
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/README b/README
index 5bfe3ee..9b92d43 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
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 52af88d..f133fb8 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
}
--
1.5.6.5
next parent reply other threads:[~2008-11-26 12:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20081126102507.GA29100@piper.oerlikon.madduck.net>
2008-11-26 12:12 ` Uwe Kleine-König [this message]
2008-11-26 12:13 [PATCH] tg export: implement skipping empty patches for quilt mode Uwe Kleine-König
2008-11-26 20:39 ` martin f krafft
2008-11-26 21:19 ` Uwe Kleine-König
-- strict thread matches above, loose matches on Subject: below --
2008-11-24 21:56 Uwe Kleine-König
2008-11-25 8:45 ` martin f krafft
2008-11-25 20:54 ` Uwe Kleine-König
2008-11-26 9:25 ` martin f krafft
2008-11-26 9:47 ` Uwe Kleine-König
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1227701552-9702-1-git-send-email-u.kleine-koenig@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=git@vger.kernel.org \
--cc=madduck@debian.org \
--cc=ukleinek@strlen.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).