0

My submodule shows as having been modified (I did not touch anything there). I have been trying to hard reset it to no avail:

~dom/gitmodules/emacswiki heads/master*
❯ git reset --hard upstream/master                                                                         141
HEAD is now at f54d96c32 How to grant GNU Emacs for OS X full disk access

~dom/gitmodules/emacswiki heads/master*
❯ git status -s                              
 M AucTeX
 M AutoLisp
...

I tried doing:

cd ../
git submodule deinit -f .
git submodule update --init
git submodule update -f --recursive

as well, which didn't do anything.

HappyFace
  • 3,439
  • 2
  • 24
  • 43
  • what's behind `gss` ? `git status -s` ? – LeGEC May 20 '21 at 14:36
  • @LeGEC yes, sorry. – HappyFace May 20 '21 at 15:21
  • `git reset --hard` just affects *this* repository; each submodule is *some other* repository. To see what's going on in the other repository / ies, enter them and run `git status` and use other Git diagnostics. (You can have the outer Git do this for you, using some of the recursion options, but in general, you'll get more control and know more about things if you do them by hand here.) – torek May 21 '21 at 01:10
  • @torek I have run the reset in repo that has modified files. Other submodules do not have modified files, and the root submodule just shows this submodule as modified. – HappyFace May 21 '21 at 15:01
  • Ah, so `dom/gitmodules/emacswiki` *is* the submodule in question? I see some interesting capitalization (`AucTeX`, `AutoLisp`, etc). Is this a Git repository that's normally developed on a case-sensitive system (e.g., on Linux using Linux file systems) that you've cloned to a case-insensitive system (typical macOS or Windows file systems)? Or (and/or): do you have Git configured to do end-of-line manipulations in your working tree? – torek May 21 '21 at 18:25
  • @torek It's `git://github.com/emacsmirror/emacswiki.org.git`, and yes, I am on macOS. I don't think that end-of-line manipulations is enabled. – HappyFace May 22 '21 at 10:28

1 Answers1

1

This:

It's git://github.com/emacsmirror/emacswiki.org.git, and yes, I am on macOS.

is the key. Cloning that repository on macOS, and checking out some of the commits near f54d96c32, with a reasonably modern Git, but on a case-folding file system (as the default file systems on macOS are), gives a lot of warnings:

warning: the following paths have collided (e.g. case-sensitive paths
on a case-insensitive filesystem) and only one from the same
colliding group is in the working tree:

  'Anything'
  'anything'
  'Artagnon'
  'artagnon'
  'AUCTeX'
  'AucTeX'
  'AutoLISP'
  'AutoLisp'
  'BookMarks'
  'Bookmarks'

[many more snipped]

Checking out commit f54d96c32 on a case-sensitive file system, we can, for instance, compare the two files AutoLISP vs AutoLisp:

$ file AutoLISP AutoLisp
AutoLISP: ASCII text
AutoLisp: ASCII text, with very long lines
$ cat AutoLISP
#REDIRECT AutoLisp
$ cat AutoLisp
AutoLisp is the API for the proprietary computer-aided design system, !AutoCAD. [snip]

To check this out correctly and easily on a Mac you will need to work in a case-sensitive file system. See, e.g., my answer to How do I change case of the names of multiple files, already committed?

torek
  • 448,244
  • 59
  • 642
  • 775