Author Topic: SmartGit - Problem with File Mode (Modified (File Mode))  (Read 9514 times)

Andi B.

  • Hero Member
  • *****
  • Posts: 811
  • Karma: +11/-2
    • View Profile
SmartGit - Problem with File Mode (Modified (File Mode))
« on: September 16, 2018, 11:22:08 am »
I'm using SmartGit now more often and there's an annoying problem I have. Our last version which runs with Java1.6 is 2.1.8a TTBOMK. I use it with a few GIT servers and the problem is, in the file panel it shows a lot of files as changed although they are not. Under Working Tree State it says 'Modified (File Mode)'. This is even after a fresh pull.

I've searched all options but did not find any to disable this for file compare. Anyone knows an external file compare utility which works with SmartGit and does no show this File Mode changes? Any hints?


Joop

  • Hero Member
  • *****
  • Posts: 633
  • Karma: +5/-0
    • View Profile
Re: SmartGit - Problem with File Mode (Modified (File Mode))
« Reply #1 on: September 16, 2018, 01:12:59 pm »
Java1.6 is 2.1.8a TTBOMK? You run this on OS/2-eCS or ArcaOS? SmartGit is programmed for the Sun version of Java, anything else will have problems due to incompatibilities. Tried SmartGit long time ago and it failed on versions of Java for OS/2-eCS.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: SmartGit - Problem with File Mode (Modified (File Mode))
« Reply #2 on: September 16, 2018, 05:39:25 pm »
Try running
Code: [Select]
git config core.fileMode false

This is a git thing, nothing to do with Java or SmartGit in particular, just that we don't properly support Unix permissions.
Be aware that if you create patches for upstream, people may get pissed off when you change/remove the permissions from shell scripts such as configure so double check.
You could also use chmod.exe to change the permissions. Something like (untested, just copied from the internet)
Code: [Select]
find . -type d -exec chmod a+rwx {} \; # Make folders traversable and read/write
find . -type f -exec chmod a+rw {} \;  # Make files read/write

Make sure you use the correct find, namely the one in @UNIXROOT/usr/bin
« Last Edit: September 16, 2018, 05:44:21 pm by Dave Yeo »

Andi B.

  • Hero Member
  • *****
  • Posts: 811
  • Karma: +11/-2
    • View Profile
Re: SmartGit - Problem with File Mode (Modified (File Mode))
« Reply #3 on: September 16, 2018, 08:25:03 pm »
Quote
git config core.fileMode false
Thanks. Just tested. It seems to work only for the current project tree which is fine. So I can use it for a few projects leaving the others untouched.

Quote
Java1.6 is 2.1.8a TTBOMK? You run this on OS/2-eCS or ArcaOS?
Running on eCS (heavily updated) is no big problem. Using here occasionally since years. But no newer version :(


Andi B.

  • Hero Member
  • *****
  • Posts: 811
  • Karma: +11/-2
    • View Profile
Re: SmartGit - Problem with File Mode (Modified (File Mode))
« Reply #4 on: September 17, 2018, 09:43:38 am »
I've read somewhere about 'core.autocrlf' setting 'true' is recommended for Win. Would this be a better option then fileMode? Or does it not work for us?

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: SmartGit - Problem with File Mode (Modified (File Mode))
« Reply #5 on: September 17, 2018, 04:34:09 pm »
I've read somewhere about 'core.autocrlf' setting 'true' is recommended for Win. Would this be a better option then fileMode? Or does it not work for us?

That's for DOS line endings, probably a good idea on OS/2 but a personal preference. I see in my %HOME%\.gitconfig I have
Code: [Select]
[core]
        autocrlf = input
so must have set it at one point. It's hard to remember all the settings I had to do at first and they run together with Mercurial settings where for quite a while I had problems with REXX scripts not running until the line endings were changed just for *.cmd