Skip to content

Commit aa91c5c

Browse files
inosmeetgitster
authored andcommitted
t6300: refactor tests to be shareable
In preparation for adding tests for the new `git refs list` command, refactor the existing t6300 test suite to make its logic shareable. Move the core test logic from `t6300-for-each-ref.sh` into a new `for-each-ref-tests.sh` file. Inside this new script, replace hardcoded calls to "git for-each-ref" with the `$git_for_each_ref` variable. The original `t6300-for-each-ref.sh` script now becomes a simple "driver". It is responsible for setting the default value of the variable and then sourcing the test library. This new structure follows the established pattern used for sharing tests between `git-blame` and `git-annotate` and prepares the test suite for the `refs list` tests to be added in a subsequent commit. Mentored-by: Patrick Steinhardt <[email protected]> Mentored-by: shejialuo <[email protected]> Mentored-by: Karthik Nayak <[email protected]> Signed-off-by: Meet Soni <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent eecccfe commit aa91c5c

File tree

2 files changed

+2143
-2138
lines changed

2 files changed

+2143
-2138
lines changed

0 commit comments

Comments
 (0)