Skip to content

Commit db9789a

Browse files
committed
Merge branch 'jh/quiltimport-explicit-series-file'
"quiltimport" allows to specify the series file by honoring the $QUILT_SERIES environment and also --series command line option. * jh/quiltimport-explicit-series-file: git-quiltimport: add commandline option --series <file>
2 parents 5e1288a + ff60ffd commit db9789a

File tree

2 files changed

+23
-4
lines changed

2 files changed

+23
-4
lines changed

Documentation/git-quiltimport.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ SYNOPSIS
1010
--------
1111
[verse]
1212
'git quiltimport' [--dry-run | -n] [--author <author>] [--patches <dir>]
13+
[--series <file>]
1314

1415

1516
DESCRIPTION
@@ -42,13 +43,19 @@ OPTIONS
4243
information can be found in the patch description.
4344

4445
--patches <dir>::
45-
The directory to find the quilt patches and the
46-
quilt series file.
46+
The directory to find the quilt patches.
4747
+
4848
The default for the patch directory is patches
4949
or the value of the $QUILT_PATCHES environment
5050
variable.
5151

52+
--series <file>::
53+
The quilt series file.
54+
+
55+
The default for the series file is <patches>/series
56+
or the value of the $QUILT_SERIES environment
57+
variable.
58+
5259
GIT
5360
---
5461
Part of the linkgit:git[1] suite

git-quiltimport.sh

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ git quiltimport [options]
66
--
77
n,dry-run dry run
88
author= author name and email address for patches without any
9-
patches= path to the quilt series and patches
9+
patches= path to the quilt patches
10+
series= path to the quilt series file
1011
"
1112
SUBDIRECTORY_ON=Yes
1213
. git-sh-setup
@@ -27,6 +28,10 @@ do
2728
shift
2829
QUILT_PATCHES="$1"
2930
;;
31+
--series)
32+
shift
33+
QUILT_SERIES="$1"
34+
;;
3035
--)
3136
shift
3237
break;;
@@ -53,6 +58,13 @@ if ! [ -d "$QUILT_PATCHES" ] ; then
5358
exit 1
5459
fi
5560

61+
# Quilt series file
62+
: ${QUILT_SERIES:=$QUILT_PATCHES/series}
63+
if ! [ -e "$QUILT_SERIES" ] ; then
64+
echo "The \"$QUILT_SERIES\" file does not exist."
65+
exit 1
66+
fi
67+
5668
# Temporary directories
5769
tmp_dir="$GIT_DIR"/rebase-apply
5870
tmp_msg="$tmp_dir/msg"
@@ -135,5 +147,5 @@ do
135147
commit=$( (echo "$SUBJECT"; echo; cat "$tmp_msg") | git commit-tree $tree -p $commit) &&
136148
git update-ref -m "quiltimport: $patch_name" HEAD $commit || exit 4
137149
fi
138-
done 3<"$QUILT_PATCHES/series"
150+
done 3<"$QUILT_SERIES"
139151
rm -rf $tmp_dir || exit 5

0 commit comments

Comments
 (0)