Re: [PATCH v4 1/2] t/t1517: automate `git subcmd -h` tests outside a repository
- From
Usman Akinyemi <usmanakinyemi202@gmail.com>
- Date
- Jul 26, 2025, 21:53 UTC
- Message-ID
- <CAPSxiM9UiCHEwdOuGi0LLQesvEnSLK+eC8ZfTEVQ+cdYedwuXQ@mail.gmail.com>
- In-Reply-To
- <CALnO6CCN0HUXJVYmvAJO3EoQQZzHVjE0P=g+AUc9c5Ti0Rcm2w@mail.gmail.com>
Show 15 quoted lines
> > +do
> > + cmd=${cmd%.*} # strip .sh, .perl, etc.
> > + case "$cmd" in
> > + archimport | cvsexportcommit | cvsimport | cvsserver | daemon | \
> > + difftool--helper | filter-branch | fsck-objects | get-tar-commit-id | \
> > + http-backend | http-fetch | http-push | init-db | instaweb.sh | \
> > + merge-octopus | merge-one-file | merge-resolve | mergetool | \
> > + mktag | p4 | p4.py | pickaxe | quiltimport | remote-ftp | remote-ftps | \
>
> Hm—if we strip the suffix with ${cmd%.*}, do we need a p4.py pattern
> too? Actually, at first I wondered why we need to strip the suffix at
> all. My local Git produces only unsuffixed commands. But
> bin-wrappers/git produces both p4 and p4.py; request-pull and
> request-pull.sh; and several others. So I think stripping is probably
> right, just drop the .py pattern.Noted and thanks.
Show 16 quoted lines
> > > + remote-http | remote-https | replay | request-pull | send-email | \ > > + sh-i18n--envsubst | shell | show | stage | submodule | svn | \ > > + upload-archive--writer | upload-pack | web--browse | whatchanged) > > + expect_outcome=expect_failure ;; > > + *) > > + expect_outcome=expect_success ;; > > + esac > > + test_$expect_outcome "'git $cmd -h' outside a repository" ' > > + test_expect_code 129 nongit git $cmd -h >usage && > > + echo "Hello" && > > Woops! While basing some work on this branch, I spotted this "echo"—I > assume it's leftover and didn't mean to be included here? Will drop > locally for my own work. >
Since you based your work on mine, does it mean I do not have to send the updated patch ?