public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* git hooks: too strict check
@ 2022-01-14 14:12 Martin Liška
  2022-01-14 16:10 ` Michael Matz
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Liška @ 2022-01-14 14:12 UTC (permalink / raw)
  To: GCC Development, Joel Brobecker

Hello.

I'm working on a testsuite clean-up where some of the files are wrongly named.
More precisely, so files have .cc extension and should use .C. However there's
existing C test-case and it leads to:

marxin@marxinbox:~/Programming/gcc/gcc/testsuite> find . -name test-asm.*
./jit.dg/test-asm.C
./jit.dg/test-asm.c

test-kunlun me/rename-testsuite-files
Enumerating objects: 804, done.
Counting objects: 100% (804/804), done.
Delta compression using up to 16 threads
Compressing objects: 100% (242/242), done.
Writing objects: 100% (564/564), 142.13 KiB | 7.48 MiB/s, done.
Total 564 (delta 424), reused 417 (delta 295), pack-reused 0
remote: Resolving deltas: 100% (424/424), completed with 222 local objects.
remote: *** The following filename collisions have been detected.
remote: *** These collisions happen when the name of two or more files
remote: *** differ in casing only (Eg: "hello.txt" and "Hello.txt").
remote: *** Please re-do your commit, chosing names that do not collide.
remote: ***
remote: ***     Commit: 7297e1de9bed96821d2bcfd034bad604ce035afb
remote: ***     Subject: Rename tests in jit sub-folder.
remote: ***
remote: *** The matching files are:
remote: ***
remote: ***     gcc/testsuite/jit.dg/test-quadratic.C
remote: ***     gcc/testsuite/jit.dg/test-quadratic.c
remote: ***
remote: ***     gcc/testsuite/jit.dg/test-switch.C
remote: ***     gcc/testsuite/jit.dg/test-switch.c
remote: ***
remote: ***     gcc/testsuite/jit.dg/test-asm.C
remote: ***     gcc/testsuite/jit.dg/test-asm.c
remote: ***
remote: ***     gcc/testsuite/jit.dg/test-alignment.C
remote: ***     gcc/testsuite/jit.dg/test-alignment.c

Can we please do something about it?

Thanks,
Martin

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

* Re: git hooks: too strict check
  2022-01-14 14:12 git hooks: too strict check Martin Liška
@ 2022-01-14 16:10 ` Michael Matz
  2022-01-14 16:27   ` Eric Gallager
  2022-01-17 11:17   ` Martin Liška
  0 siblings, 2 replies; 4+ messages in thread
From: Michael Matz @ 2022-01-14 16:10 UTC (permalink / raw)
  To: Martin Liška; +Cc: GCC Development, Joel Brobecker

Hello,

On Fri, 14 Jan 2022, Martin Liška wrote:

> Hello.
> 
> I'm working on a testsuite clean-up where some of the files are wrongly named.
> More precisely, so files have .cc extension and should use .C. However there's
> existing C test-case and it leads to:
> 
> marxin@marxinbox:~/Programming/gcc/gcc/testsuite> find . -name test-asm.*
> ./jit.dg/test-asm.C
> ./jit.dg/test-asm.c

You can't have that, the check is correct.  There are filesystems (NTFS 
for instance) that are case-preserving but case-insensitive, on those you 
really can't have two files that differ only in casing.  You need to find 
a different solution, either consistently use .cc instead of .C, live with 
the inconsistency or rename the base name of these files.


Ciao,
Michael.

> 
> test-kunlun me/rename-testsuite-files
> Enumerating objects: 804, done.
> Counting objects: 100% (804/804), done.
> Delta compression using up to 16 threads
> Compressing objects: 100% (242/242), done.
> Writing objects: 100% (564/564), 142.13 KiB | 7.48 MiB/s, done.
> Total 564 (delta 424), reused 417 (delta 295), pack-reused 0
> remote: Resolving deltas: 100% (424/424), completed with 222 local objects.
> remote: *** The following filename collisions have been detected.
> remote: *** These collisions happen when the name of two or more files
> remote: *** differ in casing only (Eg: "hello.txt" and "Hello.txt").
> remote: *** Please re-do your commit, chosing names that do not collide.
> remote: ***
> remote: ***     Commit: 7297e1de9bed96821d2bcfd034bad604ce035afb
> remote: ***     Subject: Rename tests in jit sub-folder.
> remote: ***
> remote: *** The matching files are:
> remote: ***
> remote: ***     gcc/testsuite/jit.dg/test-quadratic.C
> remote: ***     gcc/testsuite/jit.dg/test-quadratic.c
> remote: ***
> remote: ***     gcc/testsuite/jit.dg/test-switch.C
> remote: ***     gcc/testsuite/jit.dg/test-switch.c
> remote: ***
> remote: ***     gcc/testsuite/jit.dg/test-asm.C
> remote: ***     gcc/testsuite/jit.dg/test-asm.c
> remote: ***
> remote: ***     gcc/testsuite/jit.dg/test-alignment.C
> remote: ***     gcc/testsuite/jit.dg/test-alignment.c
> 
> Can we please do something about it?
> 
> Thanks,
> Martin
> 

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

* Re: git hooks: too strict check
  2022-01-14 16:10 ` Michael Matz
@ 2022-01-14 16:27   ` Eric Gallager
  2022-01-17 11:17   ` Martin Liška
  1 sibling, 0 replies; 4+ messages in thread
From: Eric Gallager @ 2022-01-14 16:27 UTC (permalink / raw)
  To: Michael Matz; +Cc: Martin Liška, GCC Development, Joel Brobecker

On Fri, Jan 14, 2022 at 11:14 AM Michael Matz via Gcc <gcc@gcc.gnu.org> wrote:
>
> Hello,
>
> On Fri, 14 Jan 2022, Martin Liška wrote:
>
> > Hello.
> >
> > I'm working on a testsuite clean-up where some of the files are wrongly named.
> > More precisely, so files have .cc extension and should use .C. However there's
> > existing C test-case and it leads to:
> >
> > marxin@marxinbox:~/Programming/gcc/gcc/testsuite> find . -name test-asm.*
> > ./jit.dg/test-asm.C
> > ./jit.dg/test-asm.c
>
> You can't have that, the check is correct.  There are filesystems (NTFS
> for instance) that are case-preserving but case-insensitive, on those you
> really can't have two files that differ only in casing.

HFS for Macs behaves this way by default, too, for reference.

> You need to find a different solution, either consistently use .cc instead
> of .C, live with the inconsistency or rename the base name of these files.
>
>
> Ciao,
> Michael.
>
> >
> > test-kunlun me/rename-testsuite-files
> > Enumerating objects: 804, done.
> > Counting objects: 100% (804/804), done.
> > Delta compression using up to 16 threads
> > Compressing objects: 100% (242/242), done.
> > Writing objects: 100% (564/564), 142.13 KiB | 7.48 MiB/s, done.
> > Total 564 (delta 424), reused 417 (delta 295), pack-reused 0
> > remote: Resolving deltas: 100% (424/424), completed with 222 local objects.
> > remote: *** The following filename collisions have been detected.
> > remote: *** These collisions happen when the name of two or more files
> > remote: *** differ in casing only (Eg: "hello.txt" and "Hello.txt").
> > remote: *** Please re-do your commit, chosing names that do not collide.
> > remote: ***
> > remote: ***     Commit: 7297e1de9bed96821d2bcfd034bad604ce035afb
> > remote: ***     Subject: Rename tests in jit sub-folder.
> > remote: ***
> > remote: *** The matching files are:
> > remote: ***
> > remote: ***     gcc/testsuite/jit.dg/test-quadratic.C
> > remote: ***     gcc/testsuite/jit.dg/test-quadratic.c
> > remote: ***
> > remote: ***     gcc/testsuite/jit.dg/test-switch.C
> > remote: ***     gcc/testsuite/jit.dg/test-switch.c
> > remote: ***
> > remote: ***     gcc/testsuite/jit.dg/test-asm.C
> > remote: ***     gcc/testsuite/jit.dg/test-asm.c
> > remote: ***
> > remote: ***     gcc/testsuite/jit.dg/test-alignment.C
> > remote: ***     gcc/testsuite/jit.dg/test-alignment.c
> >
> > Can we please do something about it?
> >
> > Thanks,
> > Martin
> >

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

* Re: git hooks: too strict check
  2022-01-14 16:10 ` Michael Matz
  2022-01-14 16:27   ` Eric Gallager
@ 2022-01-17 11:17   ` Martin Liška
  1 sibling, 0 replies; 4+ messages in thread
From: Martin Liška @ 2022-01-17 11:17 UTC (permalink / raw)
  To: Michael Matz; +Cc: GCC Development, Joel Brobecker

On 1/14/22 17:10, Michael Matz wrote:
> You can't have that, the check is correct.  There are filesystems (NTFS
> for instance) that are case-preserving but case-insensitive, on those you
> really can't have two files that differ only in casing.  You need to find
> a different solution, either consistently use .cc instead of .C, live with
> the inconsistency or rename the base name of these files.

Thank you for the explanation! I'm going to use a different naming scheme then.

Martin

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

end of thread, other threads:[~2022-01-17 11:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-14 14:12 git hooks: too strict check Martin Liška
2022-01-14 16:10 ` Michael Matz
2022-01-14 16:27   ` Eric Gallager
2022-01-17 11:17   ` Martin Liška

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).