Skip to contentSkip to conversation

Windows 7 - long/short and upper/lower filename

DISCUSSION JoséQuintas 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

I am using Windows 7 64 bits.

1)

I have a filename called ze_xmlfun.prg
Last week gitgui shows 2 changed files: ZE_XML~1.PRG and ze_xmlfun.prg At momment I can't update this file, because get a error.
Try delete file, update one name each time, but same error. Seems that a unique file is considered as 2 files, and this causes error.

2)

When do a search in history, upper/lower case must be the same as in git control. If upper/lower is changed, is considered a new file.
How to configure git to work allways using lower case on Windows?

3)

Is there a plugin or a tool to make this, to new files and to update in git repository?

Note: gitgui is a gui tool for git, ok, but once it uses git, may be this feature/change need to be made in git.

José M. C. Quintas

#1 lore raw

Hi,

Quoted 1 line · JoséQuintas

I am using Windows 7 64 bits.

... and Git version... ?

Quoted 5 lines

I have a filename called ze_xmlfun.prg
Last week gitgui shows 2 changed files: ZE_XML~1.PRG and ze_xmlfun.prg At momment I can't update this file, because get a error.
Try delete file, update one name each time, but same error. Seems that a unique file is considered as 2 files, and this causes error.

This is no longer allowed in the most recent Git for Windows 1.x versions, for exactly the reason you mentioned: the short name is actually referring to the same file as the long name. Therefore, short names will be refused.

Unfortunately, you will have to fix this issue in your repository yourself. It will most likely entail something like git rm --cached ZE_XML~1.PRG && git commit -s -m "Remove bogus file"

Quoted 4 lines

When do a search in history, upper/lower case must be the same as in git control.
If upper/lower is changed, is considered a new file.
How to configure git to work allways using lower case on Windows?

There is no such configuration. If you have a file with an undesired file name, you have to rename it. You can use git mv for that.

If the file name differs only in case, you will have to do a little dance like git mv MYFILE myfile.bak && git mv myfile.bak myfile

Quoted 2 lines

Is there a plugin or a tool to make this, to new files and to update in git repository?

No, not unless you write one.

Quoted 2 lines

Note: gitgui is a gui tool for git, ok, but once it uses git, may be this feature/change need to be made in git.

If you have an idea how to incorporate this into Git's source code, it would be a splendid idea to contribute that change to this mailing list.

Ciao,
Johannes