mxcube / mxcubeqt

Qt Front-end of MXCuBE
http://mxcube.github.io/mxcube/
GNU Lesser General Public License v3.0
14 stars 34 forks source link

Files seems to be deleted after direct check-out. #449

Closed agruzinov closed 1 year ago

agruzinov commented 1 year ago

Committing otherwise it blocks the submissions.

agruzinov commented 1 year ago

Before opening another PR with previous changes, I've also encountered some inconsistency. After synching through the web interface and git checkout agruzinov/mxcubeqt I've ended up with the master branch and git status shows that those files are deleted.

agruzinov commented 1 year ago

mxcubeqt agruzinov$ git status On branch master Your branch is up to date with 'origin/master'.

Changes to be committed: (use "git restore --staged ..." to unstage) deleted: mxcubeqt/icons/delete.png deleted: mxcubeqt/icons/save.png deleted: mxcubeqt/icons/stop.png

agruzinov commented 1 year ago

Maybe it is a weird Mac behaviour. I've synchronised my fork (dev branch) and cloned from it. After that when I do git status it shows that I have uncommitted changes and showed those three files. Ignoring/rolling back did not help... Weird.

And git does not allow mw to proceed with the rebase for another PR and so on.

agruzinov commented 1 year ago

Apparently, it is due to the filesystem. I've check explicitly one more time:

git clone -b develop https://github.com/mxcube/mxcubeqt.git Cloning into 'mxcubeqt'... remote: Enumerating objects: 28761, done. remote: Counting objects: 100% (1496/1496), done. remote: Compressing objects: 100% (435/435), done. remote: Total 28761 (delta 1101), reused 1362 (delta 1041), pack-reused 27265 Receiving objects: 100% (28761/28761), 703.61 MiB | 6.74 MiB/s, done. Resolving deltas: 100% (19543/19543), done. 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:

'mxcubeqt/icons/Delete.png' 'mxcubeqt/icons/delete.png' 'mxcubeqt/icons/Save.png' 'mxcubeqt/icons/save.png' 'mxcubeqt/icons/Stop.png' 'mxcubeqt/icons/stop.png'

Here is the corresponding topic: https://stackoverflow.com/questions/63468346/case-sensitive-path-collisions-on-case-insensitive-file-system-when-i-do-git-clo

agruzinov commented 1 year ago

It looks like that only "capital letter" files are used:

(base) MacBook-Pro:mxcubeqt agruzinov$ grep "Save.png" -r . Binary file ./.git/index matches (base) MacBook-Pro:mxcubeqt agruzinov$ grep "save.png" -r . ./docs/source/user_manual.rst:| .. image:: images/button_save.png | Save current centred position | Binary file ./.git/index matches (base) MacBook-Pro:mxcubeqt agruzinov$ grep "Stop.png" -r . ./mxcubeqt/widgets/dc_tree_widget.py: self.stop_icon = icons.load_icon("Stop.png") Binary file ./.git/index matches (base) MacBook-Pro:mxcubeqt agruzinov$ grep "stop.png" -r . Binary file ./.git/index matches (base) MacBook-Pro:mxcubeqt agruzinov$ grep "Delete.png" -r . Binary file ./.git/index matches (base) MacBook-Pro:mxcubeqt agruzinov$ grep "delete.png" -r . Binary file ./.git/index matches (base) MacBook-Pro:mxcubeqt agruzinov$

And Delete.png is not used(?). Also both files seems to be the same 32x32 png files. So, I guess it can be merged.

beteva commented 1 year ago

Would it be possible not to do a PR, but simply reverse to where the files were present?

rhfogh commented 1 year ago

Either that, or simply rename them to have the same capitalization in the PR as it already has on github?

It looks like in some OS there is a problem renaming from save.png to Save.png (or vice versa). If the capitalisation is not important just sticking to the old name should be enough. If the capitalisation is important enough, one could try renaming the files to some completely different name, merging the PR, and then renaming them back to the name with the right capitalization afterwards.

agruzinov commented 1 year ago

I can not reverse unfortunately because those "changes" are "made" by Mac filesystem directly so to say. There is no difference for it between save.png and Save png. And since save.png is not used (as of grep, see above), I do not see why those files should be kept. In the icons directory they are look identical (as well as their md5sum). Are they used? Do I miss something?

marcus-oscarsson commented 1 year ago

Ok, so I think we can merge this