quiltimport: Skip non-existent patches
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 <dbn.lists@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Dan Nicholson committed
Sep 27, 2007 at 13:30 UTC
9f569fe58f2e9a6547ae75971ebf3910be3d5872
1 file changed
+4
git-quiltimport.sh
+4
@@ -71,6 +71,10 @@ commit=$(git rev-parse HEAD)
71
72
mkdir $tmp_dir || exit 2
73
for patch_name in $(grep -v '^#' < "$QUILT_PATCHES/series" ); do
74
+ if ! [ -f "$QUILT_PATCHES/$patch_name" ] ; then
75
+ echo "$patch_name doesn't exist. Skipping."
76
+ continue
77
+ fi
78
echo $patch_name
79
git mailinfo "$tmp_msg" "$tmp_patch" \
80
<"$QUILT_PATCHES/$patch_name" >"$tmp_info" || exit 3