]> git.ipfire.org Git - thirdparty/git.git/commitdiff
test-lib functions: expand "test_commit" comment template
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Tue, 12 Jan 2021 20:17:56 +0000 (21:17 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 12 Jan 2021 22:04:41 +0000 (14:04 -0800)
Expand the comment template for "test_commit" to match that of
"test_commit_bulk" added in b1c36cb849 (test-lib: introduce
test_commit_bulk, 2019-07-02). It has several undocumented options,
which won't all fit on one line. Follow-up commit(s) will document
them.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/test-lib-functions.sh

index 999982fe4a9bd6714bf466c59f3627bafe142405..396e039d2a5f367ddaa29102c08859536b23c515 100644 (file)
@@ -178,16 +178,14 @@ debug () {
        GIT_DEBUGGER="${GIT_DEBUGGER}" "$@" <&6 >&5 2>&7
 }
 
-# Call test_commit with the arguments
-# [-C <directory>] <message> [<file> [<contents> [<tag>]]]"
+# Usage: test_commit [options] <message> [<file> [<contents> [<tag>]]]
+#   -C <dir>:
+#      Run all git commands in directory <dir>
 #
 # This will commit a file with the given contents and the given commit
 # message, and tag the resulting commit with the given tag name.
 #
 # <file>, <contents>, and <tag> all default to <message>.
-#
-# If the first argument is "-C", the second argument is used as a path for
-# the git invocations.
 
 test_commit () {
        notick= &&