public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: "Kiril Ivanov via GitGitGadget" <gitgitgadget@gmail•com>
To: git@vger•kernel.org
Cc: Kiril Ivanov <ivanovkirilg@gmail•com>,
	Kiril Ivanov <ivanovkirilg@gmail•com>
Subject: [PATCH 1/3] t9903: shorten setup using test_commit
Date: Sat, 15 Nov 2025 18:54:21 +0000	[thread overview]
Message-ID: <2ebccd3096ba8f36f9ab166b674353890191d8bc.1763232863.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.2101.git.git.1763232863.gitgitgadget@gmail.com>

From: Kiril Ivanov <ivanovkirilg@gmail•com>

Signed-off-by: Kiril Ivanov <ivanovkirilg@gmail•com>
---
 t/t9903-bash-prompt.sh | 27 +++++++++++----------------
 1 file changed, 11 insertions(+), 16 deletions(-)

diff --git a/t/t9903-bash-prompt.sh b/t/t9903-bash-prompt.sh
index 637a6f13a6..7628bc10fe 100755
--- a/t/t9903-bash-prompt.sh
+++ b/t/t9903-bash-prompt.sh
@@ -18,26 +18,21 @@ c_green='\001\e[32m\002'
 c_lblue='\001\e[1;34m\002'
 c_clear='\001\e[0m\002'
 
+# (main)                     (b1)
+# initial (t1) - second-b1 - third-b1 (t2)
+#             \
+#              second-b2 - another-b2 - yet-another-b2
+#                                       (b2)
 test_expect_success 'setup for prompt tests' '
 	git init otherrepo &&
-	echo 1 >file &&
-	git add file &&
-	test_tick &&
-	git commit -m initial &&
-	git tag -a -m msg1 t1 &&
+	test_commit --annotate initial file contents1 t1 &&
 	git checkout -b b1 &&
-	echo 2 >file &&
-	git commit -m "second b1" file &&
-	echo 3 >file &&
-	git commit -m "third b1" file &&
-	git tag -a -m msg2 t2 &&
+	test_commit --no-tag second-b1 file &&
+	test_commit --annotate third-b1 file contents2 t2 &&
 	git checkout -b b2 main &&
-	echo 0 >file &&
-	git commit -m "second b2" file &&
-	echo 00 >file &&
-	git commit -m "another b2" file &&
-	echo 000 >file &&
-	git commit -m "yet another b2" file &&
+	test_commit --no-tag second-b2 file &&
+	test_commit --no-tag another-b2 file &&
+	test_commit --no-tag yet-another-b2 file &&
 	mkdir ignored_dir &&
 	echo "ignored_dir/" >>.gitignore &&
 	git checkout main
-- 
gitgitgadget


  reply	other threads:[~2025-11-15 18:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-15 18:54 [PATCH 0/3] git-prompt: add quiet upstream indicator option Kiril Ivanov via GitGitGadget
2025-11-15 18:54 ` Kiril Ivanov via GitGitGadget [this message]
2025-11-15 18:54 ` [PATCH 2/3] t9903: add upstream indicator tests Kiril Ivanov via GitGitGadget
2025-11-15 18:54 ` [PATCH 3/3] git-prompt: add quiet upstream indicator option Kiril Ivanov via GitGitGadget
2025-11-20 16:01   ` D. Ben Knoble
2025-11-20 18:05     ` Eric Sunshine
2025-11-20 18:18       ` D. Ben Knoble
2025-11-15 20:07 ` [PATCH 0/3] " Junio C Hamano
2025-11-16 12:05   ` Kiril Ivanov
2025-11-16 16:55     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2ebccd3096ba8f36f9ab166b674353890191d8bc.1763232863.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=ivanovkirilg@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox