All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zakariyah Ali via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Christian Couder <christian.couder@gmail.com>,
	Karthik Nayak <karthik.188@gmail.com>,
	Justin Tobler <jltobler@gmail.com>,
	Siddharth Asthana <siddharthasthana31@gmail.com>,
	Ayush Chandekar <ayu.chandekar@gmail.com>,
	Zakariyah Ali <zakariyahali100@gmail.com>
Subject: [PATCH 0/2] [GSoC Patch] t2000: modernize path checks to use helper functions
Date: Sat, 23 May 2026 11:07:40 +0000	[thread overview]
Message-ID: <pull.2256.git.git.1779534462.gitgitgadget@gmail.com> (raw)

This is my GSoC microproject submission modernizing test path checks in
t/t2000-conflict-when-checking-files-out.sh.

Replace old-style path checks using test -f, test -d, and test ! -h with
dedicated test helper functions for improved test clarity and consistency.

This modernization improves test script readability by using Git's dedicated
test helpers:

test -f → test_path_is_file test -d → test_path_is_dir test ! -h && test -f
→ test_path_is_file_not_symlink test ! -h && test -d →
test_path_is_dir_not_symlink Found instances using: git grep 'test -[efd]'
t/ | grep 'test -[efd].*&&'

Converted 5 instances in t/t2000-conflict-when-checking-files-out.sh

This improves test clarity and consistency across the test suite.

I'm excited to contribute to Git and look forward to your feedback!

Zakariyah Ali (2):
  t2000: consolidate second scenario into a single test block
  t2000: cleanup unused debug code and variables

 t/t2000-conflict-when-checking-files-out.sh | 65 +++------------------
 1 file changed, 8 insertions(+), 57 deletions(-)


base-commit: 60f07c4f5c5f81c8a994d9e06b31a4a3a1679864
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2256%2Falibaba0010%2Fmodernize-test-path-checking-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2256/alibaba0010/modernize-test-path-checking-v1
Pull-Request: https://github.com/git/git/pull/2256
-- 
gitgitgadget

             reply	other threads:[~2026-05-23 11:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-23 11:07 Zakariyah Ali via GitGitGadget [this message]
2026-05-23 11:07 ` [PATCH 1/2] t2000: consolidate second scenario into a single test block Zakariyah Ali via GitGitGadget
2026-05-23 11:07 ` [PATCH 2/2] t2000: cleanup unused debug code and variables Zakariyah Ali via GitGitGadget
2026-05-24  9:55 ` [PATCH 0/2] [GSoC Patch] t2000: modernize path checks to use helper functions 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=pull.2256.git.git.1779534462.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=ayu.chandekar@gmail.com \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jltobler@gmail.com \
    --cc=karthik.188@gmail.com \
    --cc=siddharthasthana31@gmail.com \
    --cc=zakariyahali100@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.