Thread (43 messages) flat view 43 messages, 7 authors, 2021-01-15

Re: [PATCH 14/22] test-lib functions: add --author support to test_commit

From: Denton Liu <hidden>
Date: 2021-01-14 07:41:43

Hi Ævar,

On Tue, Jan 12, 2021 at 09:17:58PM +0100, Ævar Arnfjörð Bjarmason wrote:
quoted hunk ↗ jump to hunk
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
index 194b601bc0..529f6264fe 100644
--- a/t/test-lib-functions.sh
+++ b/t/test-lib-functions.sh
@@ -185,6 +185,8 @@ debug () {
 #	Do not call test_tick before making a commit
 #   --signoff
 #	Invoke "git commit" with --signoff
+#   --author=<author>
The usage shows that you have to specify the author argument with an
equal sign...
quoted hunk ↗ jump to hunk
+#	Invoke "git commit" with --author=<author>
 #
 # This will commit a file with the given contents and the given commit
 # message, and tag the resulting commit with the given tag name.
@@ -193,6 +195,7 @@ debug () {
 
 test_commit () {
 	notick= &&
+	author= &&
 	signoff= &&
 	indir= &&
 	while test $# != 0
@@ -201,6 +204,10 @@ test_commit () {
 		--notick)
 			notick=yes
 			;;
+		--author)
+			author="$2"
but over here, it's only parsed if they're presented as two separate
tokens. We should correct the usage text accordingly.

Thanks,
Denton
+			shift
+			;;
 		--signoff)
 			signoff="$1"
 			;;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help