Welcome to Centmin Mod Community
Become a Member

Beta Branch Any reason why centmin.sh isn't executable by default?

Discussion in 'Beta release code' started by jeffwidman, May 10, 2015.

  1. jeffwidman

    jeffwidman Active Member

    152
    27
    28
    Dec 3, 2014
    Ratings:
    +51
    Local Time:
    10:20 AM
    Is there any reason why centmin.sh isn't executable by the user by default?


    Git tracks file/folder permissions, so if I pull down the git repo, then make the file executable, then resync with git it keeps saying there's changes, even though the only thing I did was change file permissions.

    It's a simple change--you can see it here on my fork: Made centmin.sh executable by user · jeffwidman/centminmod@7fbd0b8 · GitHub

    Now git and ansible are both happy and report no changes unless I actually edit the code.

    Is there a security reason or something else why this hasn't been done already?
     
  2. eva2000

    eva2000 Administrator Staff Member

    54,107
    12,179
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,738
    Local Time:
    4:20 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    I do all development and code from Windows 7/8 based pc with Sourcetree git app :)

    That's why :)
     
  3. eva2000

    eva2000 Administrator Staff Member

    54,107
    12,179
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,738
    Local Time:
    4:20 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  4. jeffwidman

    jeffwidman Active Member

    152
    27
    28
    Dec 3, 2014
    Ratings:
    +51
    Local Time:
    10:20 AM
    Afraid I'm not familiar with Windows file permissions--if you made it executable on a unix box (linux/osx), then committed the file so the permissions change, would editing it on windows cause the permissions to revert?
     
  5. eva2000

    eva2000 Administrator Staff Member

    54,107
    12,179
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,738
    Local Time:
    4:20 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Yeah windows doesn't handle linux permissions afaik.
     
  6. eva2000

    eva2000 Administrator Staff Member

    54,107
    12,179
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,738
    Local Time:
    4:20 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Last edited: May 19, 2015
  7. jeffwidman

    jeffwidman Active Member

    152
    27
    28
    Dec 3, 2014
    Ratings:
    +51
    Local Time:
    10:20 AM
    Nice!
    The other way to do it is you can change the file permissions on Linux (I'm happy to do it as a pull request) and then whenever you work on the file in Sourcetree, just don't stage that particular section of the file (Sourcetree makes it easy to only commit sections of a file, not all changes).
     
  8. eva2000

    eva2000 Administrator Staff Member

    54,107
    12,179
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,738
    Local Time:
    4:20 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+