From: Dan Nicholson Date: Thu, 27 Sep 2007 20:39:54 GMT Subject: Re: [PATCH] quiltimport: Skip non-existent patches Message-ID: In-Reply-To: <1190925059-5233-1-git-send-email-dbn.lists@gmail.com> Dan Nicholson gmail.com> writes: > > When quiltimport encounters a non-existent patch in the series file, > just skip to the next patch. This matches the behavior of quilt. > > Signed-off-by: Dan Nicholson gmail.com> > --- > git-quiltimport.sh | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/git-quiltimport.sh b/git-quiltimport.sh > index 74a54d5..880c81d 100755 > --- a/git-quiltimport.sh > +++ b/git-quiltimport.sh > @@ -71,6 +71,10 @@ commit=$(git rev-parse HEAD) > > mkdir $tmp_dir || exit 2 > for patch_name in $(grep -v '^#' < "$QUILT_PATCHES/series" ); do > + if ! [ -f "$QUILT_PATCHES/$patch_name" ] ; then > + echo "$patch_name doesn't exist. Skipping." > + continue > + fi > echo $patch_name > git mailinfo "$tmp_msg" "$tmp_patch" \ > <"$QUILT_PATCHES/$patch_name" >"$tmp_info" || exit 3 I forgot to mention the rationale for this patch vs. what Junio sent. The issue with Junio's patch is that the failure will occur before $tmp_patch is created because the script tries to feed git-mailinfo a non-existent patch ($patch_name). You'll only get past the mailinfo if $patch_name exists. The marker setting may still be useful in this context, though, to suppress the "doesn't exist" message. -- Dan