Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chmod modifies git working directories in Islandora modules #78

Closed
mjordan opened this issue Jun 26, 2015 · 8 comments
Closed

chmod modifies git working directories in Islandora modules #78

mjordan opened this issue Jun 26, 2015 · 8 comments
Assignees
Labels

Comments

@mjordan
Copy link
Contributor

mjordan commented Jun 26, 2015

If you run git status in any of the Islandora module directories all files are indicated as 'modified'. git diff shows that the difference is 'old mode 100644 / new mode 100755'.

There is a git config core.fileMode false command that can nullify this behavior, but I can't find any evidence that it is configurable in .gitattributes, which would be the ideal place to tell git to ignore permission changes at the repo level. Running git config core.fileMode false in each of the cloned repo's directory would have the same effect. Configuring this setting for the vagrant user or globally seems like overkill.

@ksclarke
Copy link
Contributor

Wouldn't 644 be the proper permission for files (except scripts)? It seems if someone wanted to override this for their own copy they could add it to their local git settings, but that the repo should be opinionated about default file permissions?

@mjordan
Copy link
Contributor Author

mjordan commented Jul 2, 2015

Yes, the setting could be overridden locally on a repo-by-repo basis, but you'd have to do it on every module's repo. If that's OK, then there's no problem.

@ruebot
Copy link
Contributor

ruebot commented Jul 12, 2015

How about setting git config --global core.filemode false at the beginning of the build?

@mjordan
Copy link
Contributor Author

mjordan commented Jul 13, 2015

Sure, if that would work. Want me to test?

@ruebot
Copy link
Contributor

ruebot commented Jul 14, 2015

Sure

@mjordan
Copy link
Contributor Author

mjordan commented Jul 15, 2015

I added git config --global core.filemode false right after the line in bootstrap.sh that installs git (i.e., apt-get -y install git vim) and it didn't have any effect. Running git status in any Islandora module directory still shows that all files have been modified. When I run git config --global --list I get:

fatal: unable to read config file '/home/vagrant/.gitconfig': No such file or directory

After I add the following to /home/vagrant/.gitconfig:

; core variables
[core]
    ; Don't trust file modes
    filemode = false

I can run git config --global --list and get:

core.filemode=false

But if I run git config -l within a module directory, I get:

core.filemode=false
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=https://github.com/Islandora/islandora_checksum
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.7.x.remote=origin
branch.7.x.merge=refs/heads/7.x

I looked in a few module's .git/config files and they all contain a core.filemode = true setting. So setting it globally wouldn't work anyway since it's overridden at the repo level.

Document as known issue?

@ruebot
Copy link
Contributor

ruebot commented Jul 15, 2015

What if we did something like this:

cd "$DRUPAL_HOME"/sites/all/modules
while read LINE; do
  cd $LINE
  git config core.filemode false
  cd "$DRUPAL_HOME"/sites/all/modules
done < "$SHARED_DIR"/configs/islandora-module-list-sans-tuque.txt

Right here.

@ruebot ruebot self-assigned this Jul 20, 2015
ruebot added a commit that referenced this issue Jul 20, 2015
@ruebot
Copy link
Contributor

ruebot commented Jul 20, 2015

Closed with 63ceaf0

@ruebot ruebot closed this as completed Jul 20, 2015
@ruebot ruebot added the bug label Jul 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants