git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* test files with same names?
@ 2018-09-03 18:16 Duy Nguyen
  2018-09-04 17:27 ` Junio C Hamano
  2018-09-04 18:04 ` test files with same names? Stephen & Linda Smith
  0 siblings, 2 replies; 21+ messages in thread
From: Duy Nguyen @ 2018-09-03 18:16 UTC (permalink / raw)
  To: Git Mailing List

We have these test files with the same description:

t0410-partial-clone.sh
t5616-partial-clone.sh
t2000-checkout-cache-clash.sh
t2001-checkout-cache-clash.sh
t4134-apply-submodule.sh
t4137-apply-submodule.sh
t7500-commit.sh
t7501-commit.sh
t7502-commit.sh
t7509-commit.sh

partial-clone files, I can understand since they belong to different
groups. But should the remaining files have different descriptions?
Looking at this it's hard to know why one test should be in this file
and not the others.
-- 
Duy

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

* Re: test files with same names?
  2018-09-03 18:16 test files with same names? Duy Nguyen
@ 2018-09-04 17:27 ` Junio C Hamano
  2018-10-23  3:53   ` [PATCH 0/5] Commit test name clean-up Stephen P. Smith
                     ` (5 more replies)
  2018-09-04 18:04 ` test files with same names? Stephen & Linda Smith
  1 sibling, 6 replies; 21+ messages in thread
From: Junio C Hamano @ 2018-09-04 17:27 UTC (permalink / raw)
  To: Duy Nguyen; +Cc: Git Mailing List

Duy Nguyen <pclouds@gmail.com> writes:

> t2000-checkout-cache-clash.sh
> t2001-checkout-cache-clash.sh

These date back to 368f99d5 ("[PATCH 2/2] The core GIT tests: recent
additions and fixes.", 2005-05-13) which later were renamed by
f50c9f76 ("Rename some test scripts and describe the naming
convention", 2005-05-15).  One was about checking out a regular file
to a path where a directory currently sits, and the other is about
checking out a regular file that requires a parent directory at a
path where a regular file currently occupies.  These days, I suspect
that we would make these into a single "d/f conflict when checking
files out" test script, and f50c9f76 might have been a good chance
to do such a clean-up.  If somebody cares deeply enough, I do not
mind seeing a belated clean-up, either.

> t7500-commit.sh
> t7501-commit.sh
> t7502-commit.sh
> t7509-commit.sh

These seem to have organically grown and it is very likely that ones
later introduced were added more from laziness.

If somebody wants to clean them up, probably the first thing to do
is to study them to come up with a clear $test_description for each
of them.  I think t7509 says --reset-author and it may have started
as a test on that single feature, but it now covers other ways to
set and/or preserve authorship information, so it may make sense to
update its $test_description to "commit authorship" or something,
for example.


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

* Re: test files with same names?
  2018-09-03 18:16 test files with same names? Duy Nguyen
  2018-09-04 17:27 ` Junio C Hamano
@ 2018-09-04 18:04 ` Stephen & Linda Smith
  2018-09-05 17:25   ` How to handle patch series conflicts Stephen & Linda Smith
  1 sibling, 1 reply; 21+ messages in thread
From: Stephen & Linda Smith @ 2018-09-04 18:04 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Duy Nguyen, Git Mailing List

I don't mind doing this.

On Tuesday, September 4, 2018 10:27:26 AM MST Junio C Hamano wrote:
> Duy Nguyen <pclouds@gmail.com> writes:
> > t2000-checkout-cache-clash.sh
> > t2001-checkout-cache-clash.sh
> 
> These date back to 368f99d5 ("[PATCH 2/2] The core GIT tests: recent
> additions and fixes.", 2005-05-13) which later were renamed by
> f50c9f76 ("Rename some test scripts and describe the naming
> convention", 2005-05-15).  One was about checking out a regular file
> to a path where a directory currently sits, and the other is about
> checking out a regular file that requires a parent directory at a
> path where a regular file currently occupies.  These days, I suspect
> that we would make these into a single "d/f conflict when checking
> files out" test script, and f50c9f76 might have been a good chance
> to do such a clean-up.  If somebody cares deeply enough, I do not
> mind seeing a belated clean-up, either.
> 
> > t7500-commit.sh
> > t7501-commit.sh
> > t7502-commit.sh
> > t7509-commit.sh
> 
> These seem to have organically grown and it is very likely that ones
> later introduced were added more from laziness.
> 
> If somebody wants to clean them up, probably the first thing to do
> is to study them to come up with a clear $test_description for each
> of them.  I think t7509 says --reset-author and it may have started
> as a test on that single feature, but it now covers other ways to
> set and/or preserve authorship information, so it may make sense to
> update its $test_description to "commit authorship" or something,
> for example.





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

* How to handle patch series conflicts
  2018-09-04 18:04 ` test files with same names? Stephen & Linda Smith
@ 2018-09-05 17:25   ` Stephen & Linda Smith
  2018-09-05 17:27     ` Stefan Beller
                       ` (4 more replies)
  0 siblings, 5 replies; 21+ messages in thread
From: Stephen & Linda Smith @ 2018-09-05 17:25 UTC (permalink / raw)
  To: Junio C Hamano, Git Mailing List

Junio -

On Tuesday, September 4, 2018 10:27:26 AM MST Junio C Hamano wrote:
> > t7500-commit.sh
> > t7501-commit.sh
> > t7502-commit.sh
> > t7509-commit.sh
> 
> These seem to have organically grown and it is very likely that ones
> later introduced were added more from laziness.

How does the project prefer to handle patches that conflict.  Renaming t7501-
commit.sh will conflict with a patch set that I submitted over the weekend 
[1].  Should I treat them as totally separate? 

On Tuesday, September 4, 2018 3:36:11 PM MST Junio C Hamano wrote:
> * sl/commit-dry-run-with-short-output-fix (2018-07-30) 4 commits
>  . commit: fix exit code when doing a dry run
>  . wt-status: teach wt_status_collect about merges in progress
>  . wt-status: rename commitable to committable
>  . t7501: add coverage for flags which imply dry runs

I noted that this patch set is similar to the one that I just submitted.  Are 
you thinking of not using mine (in which case I will drop it)?  If not I will 
add a patch to fix the committable spelling[2] and re-roll.

[1] https://public-inbox.org/git/20180901235256.4260-1-ischis2@cox.net/




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

* Re: How to handle patch series conflicts
  2018-09-05 17:25   ` How to handle patch series conflicts Stephen & Linda Smith
@ 2018-09-05 17:27     ` Stefan Beller
  2018-09-05 21:16     ` Junio C Hamano
                       ` (3 subsequent siblings)
  4 siblings, 0 replies; 21+ messages in thread
From: Stefan Beller @ 2018-09-05 17:27 UTC (permalink / raw)
  To: Stephen & Linda Smith; +Cc: Junio C Hamano, git

On Wed, Sep 5, 2018 at 10:25 AM Stephen & Linda Smith <ischis2@cox.net> wrote:
>
> Junio -
>
> On Tuesday, September 4, 2018 10:27:26 AM MST Junio C Hamano wrote:
> > > t7500-commit.sh
> > > t7501-commit.sh
> > > t7502-commit.sh
> > > t7509-commit.sh
> >
> > These seem to have organically grown and it is very likely that ones
> > later introduced were added more from laziness.
>
> How does the project prefer to handle patches that conflict.  Renaming t7501-
> commit.sh will conflict with a patch set that I submitted over the weekend
> [1].  Should I treat them as totally separate?

When doing a rename, this should merge fine without much complication,
so I'd think it is fine to treat them separately. That way they can be merged
to next/master independently.

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

* Re: How to handle patch series conflicts
  2018-09-05 17:25   ` How to handle patch series conflicts Stephen & Linda Smith
  2018-09-05 17:27     ` Stefan Beller
@ 2018-09-05 21:16     ` Junio C Hamano
  2018-10-08  1:28       ` Stephen & Linda Smith
  2018-09-05 21:34     ` Stephen & Linda Smith
                       ` (2 subsequent siblings)
  4 siblings, 1 reply; 21+ messages in thread
From: Junio C Hamano @ 2018-09-05 21:16 UTC (permalink / raw)
  To: Stephen & Linda Smith; +Cc: Git Mailing List

Stephen & Linda Smith <ischis2@cox.net> writes:

> Junio -
>
> On Tuesday, September 4, 2018 10:27:26 AM MST Junio C Hamano wrote:
>> > t7500-commit.sh
>> > t7501-commit.sh
>> > t7502-commit.sh
>> > t7509-commit.sh
>> 
>> These seem to have organically grown and it is very likely that ones
>> later introduced were added more from laziness.
>
> How does the project prefer to handle patches that conflict.  Renaming t7501-
> commit.sh will conflict with a patch set that I submitted over the weekend 
> [1].  Should I treat them as totally separate? 

How about not doing the rename before the more important changes
solidify?  Alternatively, doing the rename as a preparatory clean-up
and building the more important changes on top is also possible.

> On Tuesday, September 4, 2018 3:36:11 PM MST Junio C Hamano wrote:
>> * sl/commit-dry-run-with-short-output-fix (2018-07-30) 4 commits
>>  . commit: fix exit code when doing a dry run
>>  . wt-status: teach wt_status_collect about merges in progress
>>  . wt-status: rename commitable to committable
>>  . t7501: add coverage for flags which imply dry runs
>
> I noted that this patch set is similar to the one that I just submitted.  Are 
> you thinking of not using mine (in which case I will drop it)?  If not I will 
> add a patch to fix the committable spelling[2] and re-roll.

I think that one that is not even in 'pu' hasn't been looked at for
a long time; it is probably a good idea to discard and replace, if
you have something working.

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

* Re: How to handle patch series conflicts
  2018-09-05 17:25   ` How to handle patch series conflicts Stephen & Linda Smith
  2018-09-05 17:27     ` Stefan Beller
  2018-09-05 21:16     ` Junio C Hamano
@ 2018-09-05 21:34     ` Stephen & Linda Smith
  2018-09-05 22:03     ` Stephen & Linda Smith
  2018-09-07  0:12     ` Stephen Smith
  4 siblings, 0 replies; 21+ messages in thread
From: Stephen & Linda Smith @ 2018-09-05 21:34 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Git Mailing List

On Wednesday, September 5, 2018 2:16:06 PM MST Junio C Hamano wrote:
> I think that one that is not even in 'pu' hasn't been looked at for
> a long time; it is probably a good idea to discard and replace, if
> you have something working.

I submitted [1] over the weekend.  I will add a spelling error patch and then 
submit version 3 hopefully before the end of the day.   I am working on the 
test rename, but will wait to submit until after the wt-status.c patches cook 
and then go to mainline.   Rationale:   I haven't yet gone through the commit 
scripts to decided on the best proposed names.

[1] https://public-inbox.org/git/20180901235256.4260-1-ischis2@cox.net/





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

* Re: How to handle patch series conflicts
  2018-09-05 17:25   ` How to handle patch series conflicts Stephen & Linda Smith
                       ` (2 preceding siblings ...)
  2018-09-05 21:34     ` Stephen & Linda Smith
@ 2018-09-05 22:03     ` Stephen & Linda Smith
  2018-09-07  0:12     ` Stephen Smith
  4 siblings, 0 replies; 21+ messages in thread
From: Stephen & Linda Smith @ 2018-09-05 22:03 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Git Mailing List

On Wednesday, September 5, 2018 2:16:06 PM MST Junio C Hamano wrote:
> I think that one that is not even in 'pu' hasn't been looked at for
> a long time; it is probably a good idea to discard and replace, if
> you have something working.

I submitted [1] over the weekend.  I will add a spelling error patch and then 
submit version 3 hopefully before the end of the day.   I am working on the 
test rename, but will wait to submit until after the wt-status.c patches cook 
and then go to mainline.   Rationale:   I haven't yet gone through the commit 
scripts to decided on the best proposed names.

[1] https://public-inbox.org/git/20180901235256.4260-1-ischis2@cox.net/








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

* Re: How to handle patch series conflicts
  2018-09-05 17:25   ` How to handle patch series conflicts Stephen & Linda Smith
                       ` (3 preceding siblings ...)
  2018-09-05 22:03     ` Stephen & Linda Smith
@ 2018-09-07  0:12     ` Stephen Smith
  4 siblings, 0 replies; 21+ messages in thread
From: Stephen Smith @ 2018-09-07  0:12 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Git Mailing List

On Wednesday, September 5, 2018 2:16:06 PM MST Junio C Hamano wrote:
> I think that one that is not even in 'pu' hasn't been looked at for
> a long time; it is probably a good idea to discard and replace, if
> you have something working.

I submitted a working patch set yesterday. 

[1] https://public-inbox.org/git/20180906005329.11277-1-ischis2@cox.net/T/
#m3ed5a15721318f71064dbe7225be9242c3960e1c

sps



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

* Re: How to handle patch series conflicts
  2018-09-05 21:16     ` Junio C Hamano
@ 2018-10-08  1:28       ` Stephen & Linda Smith
  2018-10-09  5:51         ` Junio C Hamano
  2018-10-09 13:11         ` Stephen Smith
  0 siblings, 2 replies; 21+ messages in thread
From: Stephen & Linda Smith @ 2018-10-08  1:28 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano

On Wednesday, September 5, 2018 2:16:06 PM MST Junio C Hamano wrote:
> Stephen & Linda Smith <ischis2@cox.net> writes:
> > Junio -
> > 
> > On Tuesday, September 4, 2018 10:27:26 AM MST Junio C Hamano wrote:
> >> > t7500-commit.sh
> >> > t7501-commit.sh
> >> > t7502-commit.sh
> >> > t7509-commit.sh
> >> 
> >> These seem to have organically grown and it is very likely that ones
> >> later introduced were added more from laziness.

Junio - I've been working this but would like your opinion on 7500, 7501 and 
now 7510.     

I note that the the commit tests have intermixed functionality.  An example is 
signoff tests that are in the three tests I mentioned. 

I've been tempted multiple times over the last week to just merge the tests 
into a single script, but that doesn't seem right either.

So would you prefer a single script?   Would you prefer me to move tests 
around?

sps



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

* Re: How to handle patch series conflicts
  2018-10-08  1:28       ` Stephen & Linda Smith
@ 2018-10-09  5:51         ` Junio C Hamano
  2018-10-09 13:11         ` Stephen Smith
  1 sibling, 0 replies; 21+ messages in thread
From: Junio C Hamano @ 2018-10-09  5:51 UTC (permalink / raw)
  To: Stephen & Linda Smith; +Cc: git

Stephen & Linda Smith <ischis2@cox.net> writes:

> Junio - I've been working this but would like your opinion on 7500, 7501 and 
> now 7510.     
>
> I note that the the commit tests have intermixed functionality.  An example is 
> signoff tests that are in the three tests I mentioned. 
>
> I've been tempted multiple times over the last week to just merge the tests 
> into a single script, but that doesn't seem right either.
>
> So would you prefer a single script?   Would you prefer me to move tests 
> around?

The scripts themselves having the same name that is no more specific
tha just "commit" does not bother _me_ personally too much.  If I
were doing it, unless you are an obsessive type that wants to see
spanking cleanness everywhere, I'd limit the changes to the minimum.

If something tested in script X is tested in another script Y and it
is trivial to see they are testing exactly the same thing, removing
one copy from script Y would be good, and if the remaining changes
in script Y becomes more focused with only such removals, that would
even be better, as at that point we can rename "tY-commit.sh" to
something more specific like "tY-commit-signature.sh".

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

* Re: How to handle patch series conflicts
  2018-10-08  1:28       ` Stephen & Linda Smith
  2018-10-09  5:51         ` Junio C Hamano
@ 2018-10-09 13:11         ` Stephen Smith
  1 sibling, 0 replies; 21+ messages in thread
From: Stephen Smith @ 2018-10-09 13:11 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

On Monday, October 8, 2018 10:51:09 PM MST Junio C Hamano wrote:

> The scripts themselves having the same name that is no more specific
> tha just "commit" does not bother _me_ personally too much.  If I
> were doing it, unless you are an obsessive type that wants to see
> spanking cleanness everywhere, I'd limit the changes to the minimum.
> 
No I'm not an obsessive type.

sps



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

* [PATCH 0/5] Commit test name clean-up
  2018-09-04 17:27 ` Junio C Hamano
@ 2018-10-23  3:53   ` Stephen P. Smith
  2018-10-23  3:53   ` [PATCH 1/5] t2000: rename and combine checkout clash tests Stephen P. Smith
                     ` (4 subsequent siblings)
  5 siblings, 0 replies; 21+ messages in thread
From: Stephen P. Smith @ 2018-10-23  3:53 UTC (permalink / raw)
  To: git

Several tests did not comply with the documented test naming standard.

The patch series was held off until updates to t7501 was merged to the
master branch.

Stephen P. Smith (5):
  t2000: rename and combine checkout clash tests
  t7509: cleanup description and filename
  t7502: rename commit test script to comply with naming convention
  t7500: rename commit tests script to comply with naming convention
  t7501: rename commit test to comply with naming convention

 t/t2000-checkout-cache-clash.sh               |  60 --------
 t/t2000-conflict-when-checking-files-out.sh   | 135 ++++++++++++++++++
 t/t2001-checkout-cache-clash.sh               |  85 -----------
 ...> t7500-commit-template-squash-signoff.sh} |   2 +-
 ....sh => t7501-commit-basic-funtionality.sh} |   0
 ...02-commit.sh => t7502-commit-porcelain.sh} |   0
 ...9-commit.sh => t7509-commit-authorship.sh} |   2 +-
 7 files changed, 137 insertions(+), 147 deletions(-)
 delete mode 100755 t/t2000-checkout-cache-clash.sh
 create mode 100755 t/t2000-conflict-when-checking-files-out.sh
 delete mode 100755 t/t2001-checkout-cache-clash.sh
 rename t/{t7500-commit.sh => t7500-commit-template-squash-signoff.sh} (99%)
 rename t/{t7501-commit.sh => t7501-commit-basic-funtionality.sh} (100%)
 rename t/{t7502-commit.sh => t7502-commit-porcelain.sh} (100%)
 rename t/{t7509-commit.sh => t7509-commit-authorship.sh} (98%)

-- 
2.19.0


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

* [PATCH 1/5] t2000: rename and combine checkout clash tests
  2018-09-04 17:27 ` Junio C Hamano
  2018-10-23  3:53   ` [PATCH 0/5] Commit test name clean-up Stephen P. Smith
@ 2018-10-23  3:53   ` Stephen P. Smith
  2018-10-23  3:53   ` [PATCH 2/5] t7509: cleanup description and filename Stephen P. Smith
                     ` (3 subsequent siblings)
  5 siblings, 0 replies; 21+ messages in thread
From: Stephen P. Smith @ 2018-10-23  3:53 UTC (permalink / raw)
  To: git

In an earlier patch some tests scripts were renamed and a naming
convention was documented. [1]

Merge t2000-checkout-cache-clash.sh and t2001-checkout-cache-clash.sh into
t2000-conflict-when-checking-files-out.sh.

[1] f50c9f76c ("Rename some test scripts and describe the naming convention", 2005-05-15)

Signed-off-by: Stephen P. Smith <ischis2@cox.net>
---
 t/t2000-checkout-cache-clash.sh             |  60 ---------
 t/t2000-conflict-when-checking-files-out.sh | 135 ++++++++++++++++++++
 t/t2001-checkout-cache-clash.sh             |  85 ------------
 3 files changed, 135 insertions(+), 145 deletions(-)
 delete mode 100755 t/t2000-checkout-cache-clash.sh
 create mode 100755 t/t2000-conflict-when-checking-files-out.sh
 delete mode 100755 t/t2001-checkout-cache-clash.sh

diff --git a/t/t2000-checkout-cache-clash.sh b/t/t2000-checkout-cache-clash.sh
deleted file mode 100755
index de3edb5d57..0000000000
--- a/t/t2000-checkout-cache-clash.sh
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 2005 Junio C Hamano
-#
-
-test_description='git checkout-index test.
-
-This test registers the following filesystem structure in the
-cache:
-
-    path0       - a file
-    path1/file1 - a file in a directory
-
-And then tries to checkout in a work tree that has the following:
-
-    path0/file0 - a file in a directory
-    path1       - a file
-
-The git checkout-index command should fail when attempting to checkout
-path0, finding it is occupied by a directory, and path1/file1, finding
-path1 is occupied by a non-directory.  With "-f" flag, it should remove
-the conflicting paths and succeed.
-'
-. ./test-lib.sh
-
-date >path0
-mkdir path1
-date >path1/file1
-
-test_expect_success \
-    'git update-index --add various paths.' \
-    'git update-index --add path0 path1/file1'
-
-rm -fr path0 path1
-mkdir path0
-date >path0/file0
-date >path1
-
-test_expect_success \
-    'git checkout-index without -f should fail on conflicting work tree.' \
-    'test_must_fail git checkout-index -a'
-
-test_expect_success \
-    'git checkout-index with -f should succeed.' \
-    'git checkout-index -f -a'
-
-test_expect_success \
-    'git checkout-index conflicting paths.' \
-    'test -f path0 && test -d path1 && test -f path1/file1'
-
-test_expect_success SYMLINKS 'checkout-index -f twice with --prefix' '
-	mkdir -p tar/get &&
-	ln -s tar/get there &&
-	echo first &&
-	git checkout-index -a -f --prefix=there/ &&
-	echo second &&
-	git checkout-index -a -f --prefix=there/
-'
-
-test_done
diff --git a/t/t2000-conflict-when-checking-files-out.sh b/t/t2000-conflict-when-checking-files-out.sh
new file mode 100755
index 0000000000..f18616ad2b
--- /dev/null
+++ b/t/t2000-conflict-when-checking-files-out.sh
@@ -0,0 +1,135 @@
+#!/bin/sh
+#
+# Copyright (c) 2005 Junio C Hamano
+#
+
+test_description='git conflicts when checking files out test.'
+
+# The first test registers the following filesystem structure in the
+# cache:
+#
+#     path0       - a file
+#     path1/file1 - a file in a directory
+#
+# And then tries to checkout in a work tree that has the following:
+#
+#     path0/file0 - a file in a directory
+#     path1       - a file
+#
+# The git checkout-index command should fail when attempting to checkout
+# path0, finding it is occupied by a directory, and path1/file1, finding
+# path1 is occupied by a non-directory.  With "-f" flag, it should remove
+# the conflicting paths and succeed.
+
+. ./test-lib.sh
+
+show_files() {
+	# show filesystem files, just [-dl] for type and name
+	find path? -ls |
+	sed -e 's/^[0-9]* * [0-9]* * \([-bcdl]\)[^ ]* *[0-9]* *[^ ]* *[^ ]* *[0-9]* [A-Z][a-z][a-z] [0-9][0-9] [^ ]* /fs: \1 /'
+	# what's in the cache, just mode and name
+	git ls-files --stage |
+	sed -e 's/^\([0-9]*\) [0-9a-f]* [0-3] /ca: \1 /'
+	# what's in the tree, just mode and name.
+	git ls-tree -r "$1" |
+	sed -e 's/^\([0-9]*\)	[^ ]*	[0-9a-f]*	/tr: \1 /'
+}
+
+date >path0
+mkdir path1
+date >path1/file1
+
+test_expect_success \
+    'git update-index --add various paths.' \
+    'git update-index --add path0 path1/file1'
+
+rm -fr path0 path1
+mkdir path0
+date >path0/file0
+date >path1
+
+test_expect_success \
+    'git checkout-index without -f should fail on conflicting work tree.' \
+    'test_must_fail git checkout-index -a'
+
+test_expect_success \
+    'git checkout-index with -f should succeed.' \
+    'git checkout-index -f -a'
+
+test_expect_success \
+    'git checkout-index conflicting paths.' \
+    'test -f path0 && test -d path1 && test -f path1/file1'
+
+test_expect_success SYMLINKS 'checkout-index -f twice with --prefix' '
+	mkdir -p tar/get &&
+	ln -s tar/get there &&
+	echo first &&
+	git checkout-index -a -f --prefix=there/ &&
+	echo second &&
+	git checkout-index -a -f --prefix=there/
+'
+
+# The second test registers the following filesystem structure in the cache:
+#
+#     path2/file0	- a file in a directory
+#     path3/file1 - a file in a directory
+#
+# and attempts to check it out when the work tree has:
+#
+#     path2/file0 - a file in a directory
+#     path3       - a symlink pointing at "path2"
+#
+# Checkout cache should fail to extract path3/file1 because the leading
+# path path3 is occupied by a non-directory.  With "-f" it should remove
+# the symlink path3 and create directory path3 and file path3/file1.
+
+mkdir path2
+date >path2/file0
+test_expect_success \
+    'git update-index --add path2/file0' \
+    'git update-index --add path2/file0'
+test_expect_success \
+    'writing tree out with git write-tree' \
+    'tree1=$(git write-tree)'
+test_debug 'show_files $tree1'
+
+mkdir path3
+date >path3/file1
+test_expect_success \
+    'git update-index --add path3/file1' \
+    'git update-index --add path3/file1'
+test_expect_success \
+    'writing tree out with git write-tree' \
+    'tree2=$(git write-tree)'
+test_debug 'show_files $tree2'
+
+rm -fr path3
+test_expect_success \
+    'read previously written tree and checkout.' \
+    'git read-tree -m $tree1 && git checkout-index -f -a'
+test_debug 'show_files $tree1'
+
+test_expect_success \
+    'add a symlink' \
+    'test_ln_s_add path2 path3'
+test_expect_success \
+    'writing tree out with git write-tree' \
+    'tree3=$(git write-tree)'
+test_debug 'show_files $tree3'
+
+# Morten says "Got that?" here.
+# Test begins.
+
+test_expect_success \
+    'read previously written tree and checkout.' \
+    'git read-tree $tree2 && git checkout-index -f -a'
+test_debug 'show_files $tree2'
+
+test_expect_success \
+    'checking out conflicting path with -f' \
+    'test ! -h path2 && test -d path2 &&
+     test ! -h path3 && test -d path3 &&
+     test ! -h path2/file0 && test -f path2/file0 &&
+     test ! -h path3/file1 && test -f path3/file1'
+
+test_done
diff --git a/t/t2001-checkout-cache-clash.sh b/t/t2001-checkout-cache-clash.sh
deleted file mode 100755
index 1fc8e634b7..0000000000
--- a/t/t2001-checkout-cache-clash.sh
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 2005 Junio C Hamano
-#
-
-test_description='git checkout-index test.
-
-This test registers the following filesystem structure in the cache:
-
-    path0/file0	- a file in a directory
-    path1/file1 - a file in a directory
-
-and attempts to check it out when the work tree has:
-
-    path0/file0 - a file in a directory
-    path1       - a symlink pointing at "path0"
-
-Checkout cache should fail to extract path1/file1 because the leading
-path path1 is occupied by a non-directory.  With "-f" it should remove
-the symlink path1 and create directory path1 and file path1/file1.
-'
-. ./test-lib.sh
-
-show_files() {
-	# show filesystem files, just [-dl] for type and name
-	find path? -ls |
-	sed -e 's/^[0-9]* * [0-9]* * \([-bcdl]\)[^ ]* *[0-9]* *[^ ]* *[^ ]* *[0-9]* [A-Z][a-z][a-z] [0-9][0-9] [^ ]* /fs: \1 /'
-	# what's in the cache, just mode and name
-	git ls-files --stage |
-	sed -e 's/^\([0-9]*\) [0-9a-f]* [0-3] /ca: \1 /'
-	# what's in the tree, just mode and name.
-	git ls-tree -r "$1" |
-	sed -e 's/^\([0-9]*\)	[^ ]*	[0-9a-f]*	/tr: \1 /'
-}
-
-mkdir path0
-date >path0/file0
-test_expect_success \
-    'git update-index --add path0/file0' \
-    'git update-index --add path0/file0'
-test_expect_success \
-    'writing tree out with git write-tree' \
-    'tree1=$(git write-tree)'
-test_debug 'show_files $tree1'
-
-mkdir path1
-date >path1/file1
-test_expect_success \
-    'git update-index --add path1/file1' \
-    'git update-index --add path1/file1'
-test_expect_success \
-    'writing tree out with git write-tree' \
-    'tree2=$(git write-tree)'
-test_debug 'show_files $tree2'
-
-rm -fr path1
-test_expect_success \
-    'read previously written tree and checkout.' \
-    'git read-tree -m $tree1 && git checkout-index -f -a'
-test_debug 'show_files $tree1'
-
-test_expect_success \
-    'add a symlink' \
-    'test_ln_s_add path0 path1'
-test_expect_success \
-    'writing tree out with git write-tree' \
-    'tree3=$(git write-tree)'
-test_debug 'show_files $tree3'
-
-# Morten says "Got that?" here.
-# Test begins.
-
-test_expect_success \
-    'read previously written tree and checkout.' \
-    'git read-tree $tree2 && git checkout-index -f -a'
-test_debug 'show_files $tree2'
-
-test_expect_success \
-    'checking out conflicting path with -f' \
-    'test ! -h path0 && test -d path0 &&
-     test ! -h path1 && test -d path1 &&
-     test ! -h path0/file0 && test -f path0/file0 &&
-     test ! -h path1/file1 && test -f path1/file1'
-
-test_done
-- 
2.19.0


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

* [PATCH 2/5] t7509: cleanup description and filename
  2018-09-04 17:27 ` Junio C Hamano
  2018-10-23  3:53   ` [PATCH 0/5] Commit test name clean-up Stephen P. Smith
  2018-10-23  3:53   ` [PATCH 1/5] t2000: rename and combine checkout clash tests Stephen P. Smith
@ 2018-10-23  3:53   ` Stephen P. Smith
  2018-10-23  4:03     ` Eric Sunshine
  2018-10-23  3:53   ` [PATCH 3/5] t7502: rename commit test script to comply with naming convention Stephen P. Smith
                     ` (2 subsequent siblings)
  5 siblings, 1 reply; 21+ messages in thread
From: Stephen P. Smith @ 2018-10-23  3:53 UTC (permalink / raw)
  To: git

Rename test and update the test description to explicitly state that
included tests all relate to commit authorship. The t7509-commit.sh
file was not rnemamed when other scripts were updated in compliance
with the test naming convention.

[1] f50c9f76c ("Rename some test scripts and describe the naming convention", 2005-05-15)

Signed-off-by: Stephen P. Smith <ischis2@cox.net>
---
 t/{t7509-commit.sh => t7509-commit-authorship.sh} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename t/{t7509-commit.sh => t7509-commit-authorship.sh} (98%)

diff --git a/t/t7509-commit.sh b/t/t7509-commit-authorship.sh
similarity index 98%
rename from t/t7509-commit.sh
rename to t/t7509-commit-authorship.sh
index ddef7ea6b0..500ab2fe72 100755
--- a/t/t7509-commit.sh
+++ b/t/t7509-commit-authorship.sh
@@ -3,7 +3,7 @@
 # Copyright (c) 2009 Erick Mattos
 #
 
-test_description='git commit --reset-author'
+test_description='commit tests of various authorhip options. '
 
 . ./test-lib.sh
 
-- 
2.19.0


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

* [PATCH 3/5] t7502: rename commit test script to comply with naming convention
  2018-09-04 17:27 ` Junio C Hamano
                     ` (2 preceding siblings ...)
  2018-10-23  3:53   ` [PATCH 2/5] t7509: cleanup description and filename Stephen P. Smith
@ 2018-10-23  3:53   ` Stephen P. Smith
  2018-10-23  3:53   ` [PATCH 4/5] t7500: rename commit tests " Stephen P. Smith
  2018-10-23  3:53   ` [PATCH 5/5] t7501: rename commit test " Stephen P. Smith
  5 siblings, 0 replies; 21+ messages in thread
From: Stephen P. Smith @ 2018-10-23  3:53 UTC (permalink / raw)
  To: git

When the test naming convention was documented[1] the commit script
was not renamed.

The test description for t7502 indicates that the test file is to
contain porcelain type options for the commit command.

The tests don't fall into a single category.  There are tests for
cleanup, sign-off, multiple message options, etc.

Rename the t7502-commit.sh to t7502-commit-porcelain.sh which reflects
the high level nature and usage of the options to commit.

[1] f50c9f76c ("Rename some test scripts and describe the naming convention", 2005-05-15)

Signed-off-by: Stephen P. Smith <ischis2@cox.net>
---
 t/{t7502-commit.sh => t7502-commit-porcelain.sh} | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename t/{t7502-commit.sh => t7502-commit-porcelain.sh} (100%)

diff --git a/t/t7502-commit.sh b/t/t7502-commit-porcelain.sh
similarity index 100%
rename from t/t7502-commit.sh
rename to t/t7502-commit-porcelain.sh
-- 
2.19.0


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

* [PATCH 4/5] t7500: rename commit tests script to comply with naming convention
  2018-09-04 17:27 ` Junio C Hamano
                     ` (3 preceding siblings ...)
  2018-10-23  3:53   ` [PATCH 3/5] t7502: rename commit test script to comply with naming convention Stephen P. Smith
@ 2018-10-23  3:53   ` Stephen P. Smith
  2018-10-23  4:05     ` Eric Sunshine
  2018-10-23  3:53   ` [PATCH 5/5] t7501: rename commit test " Stephen P. Smith
  5 siblings, 1 reply; 21+ messages in thread
From: Stephen P. Smith @ 2018-10-23  3:53 UTC (permalink / raw)
  To: git

When the test naming convention was documented[1] the commit script
was not renamed.

Update the test description to note that the tests fall into for
general categories: template, sign-off, -F and squash tests.

Chose to not add "File" to the new script name as that did not seem to
convey the current test contents for that switch.

[1] f50c9f76c ("Rename some test scripts and describe the naming convention", 2005-05-15)

Signed-off-by: Stephen P. Smith <ischis2@cox.net>
---
 t/{t7500-commit.sh => t7500-commit-template-squash-signoff.sh} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename t/{t7500-commit.sh => t7500-commit-template-squash-signoff.sh} (99%)

diff --git a/t/t7500-commit.sh b/t/t7500-commit-template-squash-signoff.sh
similarity index 99%
rename from t/t7500-commit.sh
rename to t/t7500-commit-template-squash-signoff.sh
index 31ab608b67..46a5cd4b73 100755
--- a/t/t7500-commit.sh
+++ b/t/t7500-commit-template-squash-signoff.sh
@@ -5,7 +5,7 @@
 
 test_description='git commit
 
-Tests for selected commit options.'
+Tests for template, signoff, squash and -F functions.'
 
 . ./test-lib.sh
 
-- 
2.19.0


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

* [PATCH 5/5] t7501: rename commit test to comply with naming convention
  2018-09-04 17:27 ` Junio C Hamano
                     ` (4 preceding siblings ...)
  2018-10-23  3:53   ` [PATCH 4/5] t7500: rename commit tests " Stephen P. Smith
@ 2018-10-23  3:53   ` Stephen P. Smith
  2018-10-23  4:07     ` Eric Sunshine
  5 siblings, 1 reply; 21+ messages in thread
From: Stephen P. Smith @ 2018-10-23  3:53 UTC (permalink / raw)
  To: git

The naming convention was documented [1] but this script was not
renamed.

The original commit message indicates the script tests basic commit
functionality. Clean up the test name by changing the file name to
specify the intent as documented in the initial commit.

[1] f50c9f76c ("Rename some test scripts and describe the naming convention", 2005-05-15)

Signed-off-by: Stephen P. Smith <ischis2@cox.net>
---
 t/{t7501-commit.sh => t7501-commit-basic-funtionality.sh} | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename t/{t7501-commit.sh => t7501-commit-basic-funtionality.sh} (100%)

diff --git a/t/t7501-commit.sh b/t/t7501-commit-basic-funtionality.sh
similarity index 100%
rename from t/t7501-commit.sh
rename to t/t7501-commit-basic-funtionality.sh
-- 
2.19.0


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

* Re: [PATCH 2/5] t7509: cleanup description and filename
  2018-10-23  3:53   ` [PATCH 2/5] t7509: cleanup description and filename Stephen P. Smith
@ 2018-10-23  4:03     ` Eric Sunshine
  0 siblings, 0 replies; 21+ messages in thread
From: Eric Sunshine @ 2018-10-23  4:03 UTC (permalink / raw)
  To: Stephen & Linda Smith; +Cc: Git List

On Mon, Oct 22, 2018 at 11:53 PM Stephen P. Smith <ischis2@cox.net> wrote:>
> Rename test and update the test description to explicitly state that
> included tests all relate to commit authorship. The t7509-commit.sh
> file was not rnemamed when other scripts were updated in compliance

s/rnemamed/renamed/

> with the test naming convention.
>
> Signed-off-by: Stephen P. Smith <ischis2@cox.net>

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

* Re: [PATCH 4/5] t7500: rename commit tests script to comply with naming convention
  2018-10-23  3:53   ` [PATCH 4/5] t7500: rename commit tests " Stephen P. Smith
@ 2018-10-23  4:05     ` Eric Sunshine
  0 siblings, 0 replies; 21+ messages in thread
From: Eric Sunshine @ 2018-10-23  4:05 UTC (permalink / raw)
  To: Stephen & Linda Smith; +Cc: Git List

On Mon, Oct 22, 2018 at 11:53 PM Stephen P. Smith <ischis2@cox.net> wrote:
> When the test naming convention was documented[1] the commit script
> was not renamed.
>
> Update the test description to note that the tests fall into for
> general categories: template, sign-off, -F and squash tests.

s/for/four/

> Chose to not add "File" to the new script name as that did not seem to
> convey the current test contents for that switch.
>
> Signed-off-by: Stephen P. Smith <ischis2@cox.net>

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

* Re: [PATCH 5/5] t7501: rename commit test to comply with naming convention
  2018-10-23  3:53   ` [PATCH 5/5] t7501: rename commit test " Stephen P. Smith
@ 2018-10-23  4:07     ` Eric Sunshine
  0 siblings, 0 replies; 21+ messages in thread
From: Eric Sunshine @ 2018-10-23  4:07 UTC (permalink / raw)
  To: Stephen & Linda Smith; +Cc: Git List

On Mon, Oct 22, 2018 at 11:54 PM Stephen P. Smith <ischis2@cox.net> wrote:
> The naming convention was documented [1] but this script was not
> renamed.
>
> The original commit message indicates the script tests basic commit
> functionality. Clean up the test name by changing the file name to
> specify the intent as documented in the initial commit.
>
> Signed-off-by: Stephen P. Smith <ischis2@cox.net>
> ---
> diff --git a/t/t7501-commit.sh b/t/t7501-commit-basic-funtionality.sh
> rename from t/t7501-commit.sh
> rename to t/t7501-commit-basic-funtionality.sh

s/funtionality/functionality/

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

end of thread, other threads:[~2018-10-23  4:07 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-03 18:16 test files with same names? Duy Nguyen
2018-09-04 17:27 ` Junio C Hamano
2018-10-23  3:53   ` [PATCH 0/5] Commit test name clean-up Stephen P. Smith
2018-10-23  3:53   ` [PATCH 1/5] t2000: rename and combine checkout clash tests Stephen P. Smith
2018-10-23  3:53   ` [PATCH 2/5] t7509: cleanup description and filename Stephen P. Smith
2018-10-23  4:03     ` Eric Sunshine
2018-10-23  3:53   ` [PATCH 3/5] t7502: rename commit test script to comply with naming convention Stephen P. Smith
2018-10-23  3:53   ` [PATCH 4/5] t7500: rename commit tests " Stephen P. Smith
2018-10-23  4:05     ` Eric Sunshine
2018-10-23  3:53   ` [PATCH 5/5] t7501: rename commit test " Stephen P. Smith
2018-10-23  4:07     ` Eric Sunshine
2018-09-04 18:04 ` test files with same names? Stephen & Linda Smith
2018-09-05 17:25   ` How to handle patch series conflicts Stephen & Linda Smith
2018-09-05 17:27     ` Stefan Beller
2018-09-05 21:16     ` Junio C Hamano
2018-10-08  1:28       ` Stephen & Linda Smith
2018-10-09  5:51         ` Junio C Hamano
2018-10-09 13:11         ` Stephen Smith
2018-09-05 21:34     ` Stephen & Linda Smith
2018-09-05 22:03     ` Stephen & Linda Smith
2018-09-07  0:12     ` Stephen Smith

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 NNTP newsgroup(s).