Sublime Forum

Both Text and Merge gives me modified files even when they are not changed

#1

Hi
I wanted to test working with git through the Sublime Merge but I have an issue that I have no idea why is happening. Basically most (if not all) files are tagged as modified even though there are no changes in them: <contents unchanged>.
Maybe it’s because of the setup I have? Server is on different machine and I have Samba share where I save all the files. So both Sublime Text and Sublime Merge are working within Windows on files from Linux through the Samba share. Getting git status directly on the server doesn’t show those files at all so it’s only related to what’s happening on apps. I’m quite new to the git so I don’t even know how exactly those files are tracked. I assumed some kind of hash but maybe I’m wrong.
The same goes for Sublime Text where files have this indicator on the list and there’s a info in the status bar.

0 Likes

#2

A possibility is that: Windows is case-insensitive while Linux isn’t.

0 Likes

#3

All my files have lower case names so that shouldn’t be problem…right?

Also is there a way to check why both apps mark those files as modified?

0 Likes

#4

Another possibility: Are the line endings changed from \n to \r\n or the reverse? (You can choose what line endings to use on the toolbar in Sublime Text)

image

0 Likes

#5

All my files (those that were modified, those that are only marked as modified and the rest) are set to Windows.

But Maybe it’s related to the git having internally eol set to lf? I started git directly on the server so it could be this way - don’t know how internally this works. Maybe I should set .gitattributes to force crlf?

0 Likes

#6

@Draghmar, is it possible the repo is on an more ‘primitive’ file system like FAT32? I’ve had issues before opening repos in SM/ST (possibly others) from a FAT32 flash drive. If I remember correctly, it was related to file permissions (rwx) not mapping correctly.

0 Likes

#7

No, repo is set on ext4 drive. But things like that could cause an issue then maybe it’s somehow related to the Samba share?

0 Likes

#8

Hi @Draghmar,

Sorry to hear your seeing this issue.

When you have a spare moment, could you share your Sublime Merge debug information for the repository affected.

Steps:

  1. Open Sublime Merge
  2. Open the affected repository
  3. Via the application menu, select Help > Debug Information
  4. Before sharing the debug information here, remove any sensitive information such as remote URLS, Git user information, file paths etc

Kind regards,
- Dylan from Sublime HQ

0 Likes

#9

Yeah, I had to resign from buying double license because of that and went only with ST :stuck_out_tongue:
Anyway here’s the output (I hope I didn’t miss some sensitive info XD):

=== App Version Information ===
Build: 2077

=== Git Version Information ===
Using Git: G:\Programy\Sublime Merge\Git\cmd\git.exe (bundled)
git version 2.35.3.windows.1
PATH: MANY_PATHS_WAS_EASIER_TO_REMOVE_THEM_ALL

=== Browse Page Information ===
HEAD: 83a93927f046435c876cb2c57b7e92381290e1e7
Is in merge: 0
Is in cherry_pick: 0
Is in rebase: 0
Is in revert: 0

=== Git Status Information ===
fatal: unsafe repository ('SAMBAPATH' is owned by someone else)
To add an exception for this directory, call:

	git config --global --add safe.directory '%(prefix)/SAMBAPATH'

=== Our Status Information ===
 M SOMEFILE.php
 M SOMEFILE.php
 M SOMEFILE.php
 M SOMEFILE.php
 M SOMEFILE.php
 M SOMEFILE.php
 M SOMEFILE.php
 M SOMEFILE.php
 M SOMEFILE.php
 M SOMEFILE.php
 M SOMEFILE.php
 M SOMEFILE.php
 M SOMEFILE.php
 M SOMEFILE.php
 M SOMEFILE.php
 M SOMEFILE.php
 M SOMEFILE.php
 M SOMEFILE.php
 M SOMEFILE.php
 M SOMEFILE.php
 M SOMEFILE.php
 M SOMEFILE.php
 M SOMEFILE.php
?? SOMEFILE.php

=== Git Config Information ===
color.branch=auto
color.diff=auto
color.interactive=true
color.status=auto
core.autocrlf=true
core.symlinks=false
credential.helper=manager-core
diff.astextplain.textconv=astextplain
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
filter.lfs.smudge=git-lfs smudge -- %f
help.format=html
include.path=C:/Program Files/Git/etc/gitconfig
pack.packsizelimit=2g
rebase.autosquash=true
safe.directory=SAMBAPATH2

=== Our Config Information ===
Git Config Path Information
Using config path: /C/ProgramData/Git/config
Using config path: /G/Programy/Sublime Merge/Git/etc/gitconfig
Using config path: /C/Users/konta/.config/git/config
Using config path: /C/Users/konta/.gitconfig
Using config path: /SAMBAPATH/.git/config

Our config output is different to the Git config output
branch.main.merge=refs/heads/main
branch.main.remote=origin
color.branch=auto
color.diff=auto
color.interactive=true
color.status=auto
core.autocrlf=true
core.bare=false
core.filemode=true
core.logallrefupdates=true
core.repositoryformatversion=0
core.symlinks=false
credential.helper=store
diff.astextplain.textconv=astextplain
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
filter.lfs.smudge=git-lfs smudge -- %f
help.format=html
include.path=C:/Program Files/Git/etc/gitconfig
pack.packsizelimit=2g
rebase.autosquash=true
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
remote.origin.url=DELETED
safe.directory=SAMBAPATH2

=== Git Attributes Information ===
git check_attr --all output
SOMEFILE.php
fatal: unsafe repository ('SAMBAPATH' is owned by someone else)
To add an exception for this directory, call:

	git config --global --add safe.directory '%(prefix)/SAMBAPATH'
SOMEFILE.php
fatal: unsafe repository ('SAMBAPATH' is owned by someone else)
To add an exception for this directory, call:

	git config --global --add safe.directory '%(prefix)/SAMBAPATH'
SOMEFILE.php
fatal: unsafe repository ('SAMBAPATH' is owned by someone else)
To add an exception for this directory, call:

	git config --global --add safe.directory '%(prefix)/SAMBAPATH'
SOMEFILE.php
fatal: unsafe repository ('SAMBAPATH' is owned by someone else)
To add an exception for this directory, call:

	git config --global --add safe.directory '%(prefix)/SAMBAPATH'
SOMEFILE.php
fatal: unsafe repository ('SAMBAPATH' is owned by someone else)
To add an exception for this directory, call:

	git config --global --add safe.directory '%(prefix)/SAMBAPATH'
SOMEFILE.php
fatal: unsafe repository ('SAMBAPATH' is owned by someone else)
To add an exception for this directory, call:

	git config --global --add safe.directory '%(prefix)/SAMBAPATH'
SOMEFILE.php
fatal: unsafe repository ('SAMBAPATH' is owned by someone else)
To add an exception for this directory, call:

	git config --global --add safe.directory '%(prefix)/SAMBAPATH'
SOMEFILE.php
fatal: unsafe repository ('SAMBAPATH' is owned by someone else)
To add an exception for this directory, call:

	git config --global --add safe.directory '%(prefix)/SAMBAPATH'
SOMEFILE.php
fatal: unsafe repository ('SAMBAPATH' is owned by someone else)
To add an exception for this directory, call:

	git config --global --add safe.directory '%(prefix)/SAMBAPATH'
SOMEFILE.php
fatal: unsafe repository ('SAMBAPATH' is owned by someone else)
To add an exception for this directory, call:

	git config --global --add safe.directory '%(prefix)/SAMBAPATH'
SOMEFILE.php
fatal: unsafe repository ('SAMBAPATH' is owned by someone else)
To add an exception for this directory, call:

	git config --global --add safe.directory '%(prefix)/SAMBAPATH'
SOMEFILE.php
fatal: unsafe repository ('SAMBAPATH' is owned by someone else)
To add an exception for this directory, call:

	git config --global --add safe.directory '%(prefix)/SAMBAPATH'
SOMEFILE.php
fatal: unsafe repository ('SAMBAPATH' is owned by someone else)
To add an exception for this directory, call:

	git config --global --add safe.directory '%(prefix)/SAMBAPATH'
SOMEFILE.php
fatal: unsafe repository ('SAMBAPATH' is owned by someone else)
To add an exception for this directory, call:

	git config --global --add safe.directory '%(prefix)/SAMBAPATH'
SOMEFILE.php
fatal: unsafe repository ('SAMBAPATH' is owned by someone else)
To add an exception for this directory, call:

	git config --global --add safe.directory '%(prefix)/SAMBAPATH'
SOMEFILE.php
fatal: unsafe repository ('SAMBAPATH' is owned by someone else)
To add an exception for this directory, call:

	git config --global --add safe.directory '%(prefix)/SAMBAPATH'
SOMEFILE.php
fatal: unsafe repository ('SAMBAPATH' is owned by someone else)
To add an exception for this directory, call:

	git config --global --add safe.directory '%(prefix)/SAMBAPATH'
SOMEFILE.php
fatal: unsafe repository ('SAMBAPATH' is owned by someone else)
To add an exception for this directory, call:

	git config --global --add safe.directory '%(prefix)/SAMBAPATH'
SOMEFILE.php
fatal: unsafe repository ('SAMBAPATH' is owned by someone else)
To add an exception for this directory, call:

	git config --global --add safe.directory '%(prefix)/SAMBAPATH'
SOMEFILE.php
fatal: unsafe repository ('SAMBAPATH' is owned by someone else)
To add an exception for this directory, call:

	git config --global --add safe.directory '%(prefix)/SAMBAPATH'
SOMEFILE.php
fatal: unsafe repository ('SAMBAPATH' is owned by someone else)
To add an exception for this directory, call:

	git config --global --add safe.directory '%(prefix)/SAMBAPATH'
SOMEFILE.php
fatal: unsafe repository ('SAMBAPATH' is owned by someone else)
To add an exception for this directory, call:

	git config --global --add safe.directory '%(prefix)/SAMBAPATH'
SOMEFILE.php
fatal: unsafe repository ('SAMBAPATH' is owned by someone else)
To add an exception for this directory, call:

	git config --global --add safe.directory '%(prefix)/SAMBAPATH'

=== Our Modified Files Newline Normalisation and EOL Information ===
SOMEFILE.php: autocrlf - crlf
SOMEFILE.php: autocrlf - crlf
SOMEFILE.php: autocrlf - crlf
SOMEFILE.php: autocrlf - crlf
SOMEFILE.php: autocrlf - crlf
SOMEFILE.php: autocrlf - crlf
SOMEFILE.php: autocrlf - crlf
SOMEFILE.php: autocrlf - crlf
SOMEFILE.php: autocrlf - crlf
SOMEFILE.php: autocrlf - crlf
SOMEFILE.php: autocrlf - crlf
SOMEFILE.php: autocrlf - crlf
SOMEFILE.php: autocrlf - crlf
SOMEFILE.php: autocrlf - crlf
SOMEFILE.php: autocrlf - crlf
SOMEFILE.php: autocrlf - crlf
SOMEFILE.php: autocrlf - crlf
SOMEFILE.php: autocrlf - crlf
SOMEFILE.php: autocrlf - crlf
SOMEFILE.php: autocrlf - crlf
SOMEFILE.php: autocrlf - crlf
SOMEFILE.php: autocrlf - crlf
SOMEFILE.php: autocrlf - crlf

=== Our Modified Files Flag Information ===
Ignoring symlinks: 1
SOMEFILE.php: Working - Normal File : Index - Executable File
SOMEFILE.php: Working - Normal File : Index - Executable File
SOMEFILE.php: Working - Normal File : Index - Executable File
SOMEFILE.php: Working - Normal File : Index - Executable File
SOMEFILE.php: Working - Normal File : Index - Executable File
SOMEFILE.php: Working - Normal File : Index - Executable File
SOMEFILE.php: Working - Normal File : Index - Executable File
SOMEFILE.php: Working - Normal File : Index - Executable File
SOMEFILE.php: Working - Normal File : Index - Executable File
SOMEFILE.php: Working - Normal File : Index - Executable File
SOMEFILE.php: Working - Normal File : Index - Executable File
SOMEFILE.php: Working - Normal File : Index - Executable File
SOMEFILE.php: Working - Normal File : Index - Executable File
SOMEFILE.php: Working - Normal File : Index - Executable File
SOMEFILE.php: Working - Normal File : Index - Executable File
SOMEFILE.php: Working - Normal File : Index - Executable File
SOMEFILE.php: Working - Normal File : Index - Executable File
SOMEFILE.php: Working - Normal File : Index - Executable File
SOMEFILE.php: Working - Normal File : Index - Executable File
SOMEFILE.php: Working - Normal File : Index - Executable File
SOMEFILE.php: Working - Normal File : Index - Executable File
SOMEFILE.php: Working - Normal File : Index - Executable File
SOMEFILE.php: Working - Normal File : Index - Executable File
0 Likes

#10

Hi @Draghmar,

Thanks for sharing this!

When you have a spare moment, could you do the following:

  • Run the command to add an unsafe repository exception as shown in the debug output:
    • git config --global --add safe.directory '%(prefix)/SAMBAPATH' replacing the '%(prefix)/SAMBAPATH' with the path to the repository
  • Run git status with command line git and confirm whether it also shows the modified files

Thanks,
- Dylan from Sublime HQ

0 Likes

#11

Ok, did that and although it made this ‘unsafe’ message go away, I still get the same files as being changed. Both directly in SM and by using bundled git through the Windows terminal. To be clear - when using git directly from server, status doesn’t show those files.

0 Likes