lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Fri, 20 Dec 2013 18:21:27 +0800
From:	Wang Nan <wangnan0@...wei.com>
To:	<git@...r.kernel.org>
CC:	Wang Nan <wangnan0@...wei.com>
Subject: [PATCH] git-quiltimport: add a --series option

This patch add a --series option to git-quiltimport to allow users to
select the name of series file. This option is an analog of quilt's
QUILT_SERIES environment variable.

Signed-off-by: Wang Nan <wangnan0@...wei.com>
---
 Documentation/git-quiltimport.txt |  5 +++++
 git-quiltimport.sh                | 21 ++++++++++++++++++++-
 2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/Documentation/git-quiltimport.txt b/Documentation/git-quiltimport.txt
index a356196..39d8e4b 100644
--- a/Documentation/git-quiltimport.txt
+++ b/Documentation/git-quiltimport.txt
@@ -44,6 +44,11 @@ OPTIONS
 --patches <dir>::
 	The directory to find the quilt patches and the
 	quilt series file.
+
+--series <file>::
+	The name of the series file, defaulting to "series". Relative to
+	patches directory unless an absolute path is used.
+
 +
 The default for the patch directory is patches
 or the value of the $QUILT_PATCHES environment
diff --git a/git-quiltimport.sh b/git-quiltimport.sh
index 8e17525..11a97b4 100755
--- a/git-quiltimport.sh
+++ b/git-quiltimport.sh
@@ -6,6 +6,7 @@ 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
+series=       name of the series file
 "
 SUBDIRECTORY_ON=Yes
 . git-sh-setup
@@ -26,6 +27,10 @@ do
 		shift
 		QUILT_PATCHES="$1"
 		;;
+	--series)
+		shift
+		QUILT_SERIES="$1"
+		;;
 	--)
 		shift
 		break;;
@@ -52,6 +57,20 @@ if ! [ -d "$QUILT_PATCHES" ] ; then
 	exit 1
 fi
 
+: ${QUILT_SERIES:=series}
+case ${QUILT_SERIES} in
+	/*)
+		QUILT_SERIES_FILE=${QUILT_SERIES}
+	   ;;
+	*)
+		QUILT_SERIES_FILE=${QUILT_PATCHES}/${QUILT_SERIES}
+esac
+
+if ! [ -f "$QUILT_SERIES_FILE" ] ; then
+	echo "The \"$QUILT_SERIES_FILE\" file does not exist."
+	exit 1
+fi
+
 # Temporary directories
 tmp_dir="$GIT_DIR"/rebase-apply
 tmp_msg="$tmp_dir/msg"
@@ -134,5 +153,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_FILE"
 rm -rf $tmp_dir || exit 5
-- 
1.8.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ