git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] tests: rename work-tree tests to *work-tree*
@ 2016-02-20 16:18 Michael J Gruber
  2016-02-20 21:42 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Michael J Gruber @ 2016-02-20 16:18 UTC (permalink / raw
  To: git

"Work tree" or "working tree" is the name of a checked out tree,
"worktree" the name of the command which manages several working trees.
The naming of tests mixes these two, currently:

$ls t/*worktree*
t/t1501-worktree.sh
t/t1509-root-worktree.sh
t/t2025-worktree-add.sh
t/t2026-worktree-prune.sh
t/t2027-worktree-list.sh
t/t2104-update-index-skip-worktree.sh
t/t3320-notes-merge-worktrees.sh
t/t7011-skip-worktree-reading.sh
t/t7012-skip-worktree-writing.sh
t/t7409-submodule-detached-worktree.sh

$grep -l "git worktree" t/*.sh
t/t0002-gitfile.sh
t/t1400-update-ref.sh
t/t2025-worktree-add.sh
t/t2026-worktree-prune.sh
t/t2027-worktree-list.sh
t/t3320-notes-merge-worktrees.sh
t/t7410-submodule-checkout-to.sh

Rename t1501, t1509 and t7409 to make it clear on first glance that they
test work tree related behavior, rather than the worktree command.

t2104, t7011 and t7012 are about the "skip-worktree" flag so that their
name should remain unchanged.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
Just some housekeeping. Not super necessary, but should make it easier to find
the right test to amend, for example.

 t/{t1501-worktree.sh => t1501-work-tree.sh}                               | 0
 t/{t1509-root-worktree.sh => t1509-root-work-tree.sh}                     | 0
 ...bmodule-detached-worktree.sh => t7409-submodule-detached-work-tree.sh} | 0
 3 files changed, 0 insertions(+), 0 deletions(-)
 rename t/{t1501-worktree.sh => t1501-work-tree.sh} (100%)
 rename t/{t1509-root-worktree.sh => t1509-root-work-tree.sh} (100%)
 rename t/{t7409-submodule-detached-worktree.sh => t7409-submodule-detached-work-tree.sh} (100%)

diff --git a/t/t1501-worktree.sh b/t/t1501-work-tree.sh
similarity index 100%
rename from t/t1501-worktree.sh
rename to t/t1501-work-tree.sh
diff --git a/t/t1509-root-worktree.sh b/t/t1509-root-work-tree.sh
similarity index 100%
rename from t/t1509-root-worktree.sh
rename to t/t1509-root-work-tree.sh
diff --git a/t/t7409-submodule-detached-worktree.sh b/t/t7409-submodule-detached-work-tree.sh
similarity index 100%
rename from t/t7409-submodule-detached-worktree.sh
rename to t/t7409-submodule-detached-work-tree.sh
-- 
2.7.1.428.g2de392b

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] tests: rename work-tree tests to *work-tree*
  2016-02-20 16:18 [PATCH] tests: rename work-tree tests to *work-tree* Michael J Gruber
@ 2016-02-20 21:42 ` Junio C Hamano
  2016-02-22 10:35   ` Michael J Gruber
  0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2016-02-20 21:42 UTC (permalink / raw
  To: Michael J Gruber; +Cc: git

Michael J Gruber <git@drmicha.warpmail.net> writes:

> "Work tree" or "working tree" is the name of a checked out tree,
> "worktree" the name of the command which manages several working trees.
> The naming of tests mixes these two, currently:
>
> $ls t/*worktree*
> ...
> Rename t1501, t1509 and t7409 to make it clear on first glance that they
> test work tree related behavior, rather than the worktree command.
>
> t2104, t7011 and t7012 are about the "skip-worktree" flag so that their
> name should remain unchanged.
>
> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
> ---
> Just some housekeeping. Not super necessary, but should make it easier to find
> the right test to amend, for example.

That is rather unfortunate.  Most of them predate the "worktree"
subcommand, I think, and having to rename them merely because a
subcommand with a confusing name appeared sound somewhat backwards.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] tests: rename work-tree tests to *work-tree*
  2016-02-20 21:42 ` Junio C Hamano
@ 2016-02-22 10:35   ` Michael J Gruber
  2016-02-22 17:57     ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Michael J Gruber @ 2016-02-22 10:35 UTC (permalink / raw
  To: Junio C Hamano; +Cc: git

Junio C Hamano venit, vidit, dixit 20.02.2016 22:42:
> Michael J Gruber <git@drmicha.warpmail.net> writes:
> 
>> "Work tree" or "working tree" is the name of a checked out tree,
>> "worktree" the name of the command which manages several working trees.
>> The naming of tests mixes these two, currently:
>>
>> $ls t/*worktree*
>> ...
>> Rename t1501, t1509 and t7409 to make it clear on first glance that they
>> test work tree related behavior, rather than the worktree command.
>>
>> t2104, t7011 and t7012 are about the "skip-worktree" flag so that their
>> name should remain unchanged.
>>
>> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
>> ---
>> Just some housekeeping. Not super necessary, but should make it easier to find
>> the right test to amend, for example.
> 
> That is rather unfortunate.  Most of them predate the "worktree"
> subcommand, I think, and having to rename them merely because a
> subcommand with a confusing name appeared sound somewhat backwards.

The question is: What ist the way forward?

I was looking for a proper place for a "git worktree" test and got
confused by the status quo. My suggestion is one way to help that
confusion, but I'd be happy to learn other ways. "grep" is an answer, too.

Maybe it's also time to admit that the numbering and naming scheme in t/
don't scale and that we should rather support other means of navigating
t/, such as standardizing a comment boiler plate in each test or such.

In fact, giving up on the numbering scheme would allow to regroup tests
more easily because there would be no room constraint any more (within a
fixed finite set of numbers).

Michael

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] tests: rename work-tree tests to *work-tree*
  2016-02-22 10:35   ` Michael J Gruber
@ 2016-02-22 17:57     ` Junio C Hamano
  0 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2016-02-22 17:57 UTC (permalink / raw
  To: Michael J Gruber; +Cc: git

Michael J Gruber <git@drmicha.warpmail.net> writes:

>> That is rather unfortunate.  Most of them predate the "worktree"
>> subcommand, I think, and having to rename them merely because a
>> subcommand with a confusing name appeared sound somewhat backwards.
>
> The question is: What ist the way forward?

Probably many.  Take this as-is is one, rename newer ones that are
about worktree subcommand to "s/worktree/worktree-cmd/" would be
another.

> I was looking for a proper place for a "git worktree" test and got
> confused by the status quo. My suggestion is one way to help that
> confusion, but I'd be happy to learn other ways. "grep" is an answer, too.
>
> Maybe it's also time to admit that the numbering and naming scheme in t/
> don't scale and that we should rather support other means of navigating
> t/, such as standardizing a comment boiler plate in each test or such.

Yeah, test_description at the beginning of each test may have been a
well meaning attempt, but it is not helping us very much.

> In fact, giving up on the numbering scheme would allow to regroup tests
> more easily because there would be no room constraint any more (within a
> fixed finite set of numbers).

I tend to agree that may be an easier way forward in the longer
term.

Thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-02-22 17:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-20 16:18 [PATCH] tests: rename work-tree tests to *work-tree* Michael J Gruber
2016-02-20 21:42 ` Junio C Hamano
2016-02-22 10:35   ` Michael J Gruber
2016-02-22 17:57     ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).