threads / discuss / 26007

file names

Subject: file names

## tl;dr

3 messages between Dec 9, 2010 and Dec 9, 2010.

replies: 2people: 2as markdown or json

Thiago Farina· Dec 9, 2010, 17:05 UTC · lore

Hi, I was was looking into the file names and noticed that they are not consistent.

Some files are named like:
foo-bar.[c/h]
Others are:
foo_bar.[c/h]
On top of the git directory:

# With dash $ lc *.c | grep - | wc -l 72

$ lc *.h | grep - | wc -l 25

# With underline $ ls *.c | grep _ | wc -l 5

$ ls *.h | grep _ | wc -l 1

So it seems from this data, there is a preference for naming files using dash over underline.

So the question is, should the files using underline be converted to use dash instead? And should this be documented somewhere? Maybe in CodingGuidelines?

Thanks in advance.
Junio C Hamano· Dec 9, 2010, 17:51 UTC · re: Thiago Farina · lore

Re: file names

Thiago Farina <tfransosi@gmail.com> writes:
> So it seems from this data, there is a preference for naming files
> using dash over underline.
Yes.
> So the question is, should the files using underline be converted to
> use dash instead?

If this were before v1.0.0, it might have made some sense, but not at this moment. So the answer to "should?" (or "could?") is a firm "no", which is always different from the answer to "wouldn't it have been nicer if they were named differently?"

Or just after a large version bump (say 1.8.0), perhaps.
Thiago Farina· Dec 9, 2010, 18:00 UTC · re: Junio C Hamano · lore

Re: file names

On Thu, Dec 9, 2010 at 3:51 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 15 quoted lines
> Thiago Farina <tfransosi@gmail.com> writes:
>
>> So it seems from this data, there is a preference for naming files
>> using dash over underline.
>
> Yes.
>
>> So the question is, should the files using underline be converted to
>> use dash instead?
>
> If this were before v1.0.0, it might have made some sense, but not at this
> moment.  So the answer to "should?" (or "could?") is a firm "no", which is
> always different from the answer to "wouldn't it have been nicer if they
> were named differently?"
>
Right.
What about documenting it? Is it worth, but only on version 1.8.0?

← back to recent threads