0
Declined

Support Stage/commit renamed files with "core.ignoreCase=false" on case-insensitive file system

Bugged 5 years ago updated by Marc Strapetz 5 years ago 2

I set "git config core.ignorecase false" in my repositories and I am trying to first stage their new names:

Image 401

When I select all new names and hit Stage, Smargit issues a command adding both the new and old file names.

The result of the command can be seem next. I am renaming files (in submodules) fixing their case name, for example, from README.MD to README.md, and similar case name fixies.

Adding New names: (Smartgit console)
Alignment> git.exe add --force -- README.md readme.md
AmxxChannel> git.exe add --force -- README.MD README.md
AmxxEditor> git.exe add --force -- README.MD README.md
ApplySyntax> git.exe add --force -- README.md readme.md
BracketHighlighter> git.exe add --force -- README.md readme.md
BufferScroll> git.exe add --force -- README.md readme.md
C++ Completions> git.exe add --force -- README.md readme.md
CaseConversion> git.exe add --force -- README.md readme.md
ChannelRepositoryTools> git.exe add --force -- README.md readme.md
ClearCursorsCarets> git.exe add --force -- README.MD README.md
ClipboardScopeCopy> git.exe add --force -- README.MD README.md
DefaultSyntax> git.exe add --force -- README.MD README.md
ExportHtml> git.exe add --force -- README.md readme.md
FixProjectSwitchRestartBug> git.exe add --force -- README.MD README.md
FixSelectionAfterIndent> git.exe add --force -- README.MD README.md
ForceRewriteSublimeSettings> git.exe add --force -- README.MD README.md
GotoLastEditEnhanced> git.exe add --force -- README.md readme.md
HexViewer> git.exe add --force -- README.md readme.md
IndentSize> git.exe add --force -- README.md readme.md
KeepPastedTextSelected> git.exe add --force -- README.MD README.md
Language - English and Portuguese> git.exe add --force -- README.MD README.md
Octave> git.exe add --force -- README.MD README.md
OpenAutoCompletion> git.exe add --force -- README.MD README.md
OverrideCommitCompletion> git.exe add --force -- README.MD README.md
PackagesManager> git.exe add --force -- README.md readme.md
RememberCommandPaletteInput> git.exe add --force -- README.MD README.md
RichPlainText> git.exe add --force -- README.MD README.md
ScopeHunter> git.exe add --force -- README.md readme.md
SelectAllSpellingErrors> git.exe add --force -- README.MD README.md
SideBarEnhancements> git.exe add --force -- README.md readme.md
SkipCloseForClonedViews> git.exe add --force -- README.MD README.md
SQLKeywordUppercase> git.exe add --force -- README.MD README.md
StudioChannel> git.exe add --force -- README.MD README.md
SyncViewScroll> git.exe add --force -- README.md ReadMe.md
TerminalShortcuts> git.exe add --force -- README.md readme.md
VBScript> git.exe add --force -- README.md readme.md
ViewSettingsFreely> git.exe add --force -- README.MD README.md
WordCount> git.exe add --force -- README.md readme.md

As you can see, the above command is adding both new and old names of the files.

However, after running the above, the working tree lost the renamed status of the files and only the new names were staged as new files, instead of renamed files.

Image 399

The old file names are still marked as untracked/Missing.


Then, if I try to stage the old names with Smartgit, nothing happens:

Old names: (Smartgit console)
Alignment> git.exe add --force -- readme.md
AmxxChannel> git.exe add --force -- README.MD
AmxxEditor> git.exe add --force -- README.MD
ApplySyntax> git.exe add --force -- readme.md
BracketHighlighter> git.exe add --force -- readme.md
BufferScroll> git.exe add --force -- readme.md
C++ Completions> git.exe add --force -- readme.md
CaseConversion> git.exe add --force -- readme.md
ChannelRepositoryTools> git.exe add --force -- readme.md
ClearCursorsCarets> git.exe add --force -- README.MD
ClipboardScopeCopy> git.exe add --force -- README.MD
DefaultSyntax> git.exe add --force -- README.MD
ExportHtml> git.exe add --force -- readme.md
FixProjectSwitchRestartBug> git.exe add --force -- README.MD
FixSelectionAfterIndent> git.exe add --force -- README.MD
ForceRewriteSublimeSettings> git.exe add --force -- README.MD
GotoLastEditEnhanced> git.exe add --force -- readme.md
HexViewer> git.exe add --force -- readme.md
IndentSize> git.exe add --force -- readme.md
KeepPastedTextSelected> git.exe add --force -- README.MD
Language - English and Portuguese> git.exe add --force -- README.MD
Octave> git.exe add --force -- README.MD
OpenAutoCompletion> git.exe add --force -- README.MD
OverrideCommitCompletion> git.exe add --force -- README.MD
PackagesManager> git.exe add --force -- readme.md
RememberCommandPaletteInput> git.exe add --force -- README.MD
RichPlainText> git.exe add --force -- README.MD
ScopeHunter> git.exe add --force -- readme.md
SelectAllSpellingErrors> git.exe add --force -- README.MD
SideBarEnhancements> git.exe add --force -- readme.md
SkipCloseForClonedViews> git.exe add --force -- README.MD
SQLKeywordUppercase> git.exe add --force -- README.MD
StudioChannel> git.exe add --force -- README.MD
SyncViewScroll> git.exe add --force -- ReadMe.md
TerminalShortcuts> git.exe add --force -- readme.md
VBScript> git.exe add --force -- readme.md
ViewSettingsFreely> git.exe add --force -- README.MD
WordCount> git.exe add --force -- readme.md

Smartgit runs the command, but the files are not staged either as Removed or Renamed files.

The old file names are just kept hanging there on the working tree as nothing happened:

Image 398

And If commit this, the files are marked as new files add instead of renamed files.

As the Git docs state, "core.ignoreCase" is not expected to be changed by the user [1]: Git relies on the proper configuration of this variable for your operating and file system. Modifying this value may result in unexpected behavior.

[1] https://git-scm.com/docs/git-config#Documentation/git-config.txt-coreignoreCase