From: Junio C Hamano <gitster@pobox.com>
To: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: git@vger.kernel.org, Geoff Levand <geoffrey.levand@am.sony.com>
Subject: Re: git-quiltimport and non-existent patches
Date: Thu, 27 Sep 2007 12:41:14 -0700 [thread overview]
Message-ID: <7vps03uc9x.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <Pine.LNX.4.62.0709271154440.10467@pademelon.sonytel.be> (Geert Uytterhoeven's message of "Thu, 27 Sep 2007 11:59:51 +0200 (CEST)")
Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> writes:
> It would be nice if git-quiltimport would just warn about
> non-existent patches, just like quilt. This will make it work
> with `markers' we put in our quilt series files. Commenting
> out the markers is no solution as `quilt series' doesn't show
> commented-out patches.
I cannot decide if this should be the default (that's up to
heavy users of git-quiltimport script), but something along this
line should do. Care to test it and ack?
---
git-quiltimport.sh | 21 +++++++++++++++++----
1 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/git-quiltimport.sh b/git-quiltimport.sh
index 74a54d5..3c38959 100755
--- a/git-quiltimport.sh
+++ b/git-quiltimport.sh
@@ -4,6 +4,7 @@ SUBDIRECTORY_ON=Yes
. git-sh-setup
dry_run=""
+error_empty=t
quilt_author=""
while test $# != 0
do
@@ -25,6 +26,11 @@ do
dry_run=1
;;
+ --expect-marker)
+ shift
+ error_empty=
+ ;;
+
--pa=*|--pat=*|--patc=*|--patch=*|--patche=*|--patches=*)
QUILT_PATCHES=$(expr "z$1" : 'z-[^=]*\(.*\)')
shift
@@ -74,10 +80,17 @@ for patch_name in $(grep -v '^#' < "$QUILT_PATCHES/series" ); do
echo $patch_name
git mailinfo "$tmp_msg" "$tmp_patch" \
<"$QUILT_PATCHES/$patch_name" >"$tmp_info" || exit 3
- test -s "$tmp_patch" || {
- echo "Patch is empty. Was it split wrong?"
- exit 1
- }
+ if test ! -s "$tmp_patch"
+ then
+ if test -z "$error_empty"
+ then
+ echo "Patch is empty. Was it split wrong?"
+ exit 1
+ else
+ echo "Marker seen."
+ continue
+ fi
+ fi
# Parse the author information
export GIT_AUTHOR_NAME=$(sed -ne 's/Author: //p' "$tmp_info")
next prev parent reply other threads:[~2007-09-27 19:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-27 9:59 git-quiltimport and non-existent patches Geert Uytterhoeven
2007-09-27 19:41 ` Junio C Hamano [this message]
2007-09-27 20:30 ` [PATCH] quiltimport: Skip " Dan Nicholson
2007-09-27 20:39 ` Dan Nicholson
2007-09-27 20:50 ` Junio C Hamano
2007-09-27 21:45 ` Dan Nicholson
2007-09-27 22:02 ` Junio C Hamano
2007-09-27 22:20 ` Dan Nicholson
2007-09-28 14:06 ` Geert Uytterhoeven
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=7vps03uc9x.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=Geert.Uytterhoeven@sonycom.com \
--cc=geoffrey.levand@am.sony.com \
--cc=git@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.