summaryrefslogtreecommitdiff
path: root/git-quiltimport.sh
diff options
context:
space:
mode:
authorJuerg Haefliger <juerg.haefliger@hp.com>2015-08-31 14:06:38 +0200
committerJunio C Hamano <gitster@pobox.com>2015-09-01 11:10:07 -0700
commitff60ffdc05fe8e2d26c488ab18c66b7fa746fcc6 (patch)
tree4970ee64a2db0a66a9c3ae117b43989ca50de84d /git-quiltimport.sh
parentb260d265e189728b26e50506ac6ffab6a7d588da (diff)
downloadgit-ff60ffdc05fe8e2d26c488ab18c66b7fa746fcc6.tar.gz
git-quiltimport: add commandline option --series <file>jh/quiltimport-explicit-series-file
The quilt series file doesn't have to be located in the same directory with the patches and can be named differently than 'series' as well. This patch adds a commandline option to allow for a non-standard series filename and location. Signed-off-by: Juerg Haefliger <juerg.haefliger@hp.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-quiltimport.sh')
-rwxr-xr-xgit-quiltimport.sh16
1 files changed, 14 insertions, 2 deletions
diff --git a/git-quiltimport.sh b/git-quiltimport.sh
index 167d79fea8..6d3a88decd 100755
--- a/git-quiltimport.sh
+++ b/git-quiltimport.sh
@@ -6,7 +6,8 @@ git quiltimport [options]
--
n,dry-run dry run
author= author name and email address for patches without any
-patches= path to the quilt series and patches
+patches= path to the quilt patches
+series= path to the quilt series file
"
SUBDIRECTORY_ON=Yes
. git-sh-setup
@@ -27,6 +28,10 @@ do
shift
QUILT_PATCHES="$1"
;;
+ --series)
+ shift
+ QUILT_SERIES="$1"
+ ;;
--)
shift
break;;
@@ -53,6 +58,13 @@ if ! [ -d "$QUILT_PATCHES" ] ; then
exit 1
fi
+# Quilt series file
+: ${QUILT_SERIES:=$QUILT_PATCHES/series}
+if ! [ -e "$QUILT_SERIES" ] ; then
+ echo "The \"$QUILT_SERIES\" file does not exist."
+ exit 1
+fi
+
# Temporary directories
tmp_dir="$GIT_DIR"/rebase-apply
tmp_msg="$tmp_dir/msg"
@@ -135,5 +147,5 @@ do
commit=$( (echo "$SUBJECT"; echo; cat "$tmp_msg") | git commit-tree $tree -p $commit) &&
git update-ref -m "quiltimport: $patch_name" HEAD $commit || exit 4
fi
-done 3<"$QUILT_PATCHES/series"
+done 3<"$QUILT_SERIES"
rm -rf $tmp_dir || exit 5