# file names

3 messages from 2010-12-09 to 2010-12-09. Participants: Thiago Farina, Junio C Hamano.
Thread: https://gitlist.dev/t/26007

## Thiago Farina, 2010-12-09 17:05

Subject: file names
Message-ID: <AANLkTikeAFj68Rr35gcf4dxXXHU+au9wA7wd+-WB3BSS@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTikeAFj68Rr35gcf4dxXXHU%2Bau9wA7wd%2B-WB3BSS%40mail.gmail.com

```
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, 2010-12-09 17:51

Subject: Re: file names
Message-ID: <7v39q6hm14.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7v39q6hm14.fsf%40alter.siamese.dyndns.org
In-Reply-To: <AANLkTikeAFj68Rr35gcf4dxXXHU+au9wA7wd+-WB3BSS@mail.gmail.com>

```
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, 2010-12-09 18:00

Subject: Re: file names
Message-ID: <AANLkTin=H5HMKhXAyPwZu+jJinRxAhiirhWSSUCWNhWY@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTin%3DH5HMKhXAyPwZu%2BjJinRxAhiirhWSSUCWNhWY%40mail.gmail.com
In-Reply-To: <7v39q6hm14.fsf@alter.siamese.dyndns.org>

```
On Thu, Dec 9, 2010 at 3:51 PM, Junio C Hamano <gitster@pobox.com> wrote:
> 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?

```
