Filemode is a nuisance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I work at a web development company, a few years ago we switched from using SVN to using git. Since then a lot of little issues and improvements have been made to git, I have to thank the developers for their hard work.

However, one problem still remains. Our projects are often cloned onto a large variety of computer environments, from Linux servers to OSX and Windows desktops. Each of these environments tends to have its own requirements for file permissions, depending on how Apache and PHP have been configured.

As a result of this we're nearly constantly forced to manually set filemode to false in every repository, including submodules.

The following is the output of git status on one of our repositories with a moderate number of submodules:

# modified:  extensions/asdc (modified content)
# modified:  extensions/canofspam (modified content, untracked content)
# modified:  extensions/db_sync (modified content)
# modified:  extensions/debugdevkit (modified content)
# modified:  extensions/emailtemplatefilter (modified content)
# modified:  extensions/export_entry (modified content)
# modified:  extensions/expressionfield (modified content)
# modified:  extensions/flexdatefield (modified content)
# modified:  extensions/globalresourceloader (modified content)
# modified:  extensions/logsdevkit (modified content)
# modified:  extensions/mpm/extension.driver.php
# modified:  extensions/order_entries (modified content)
# modified:  extensions/profiledevkit (modified content)
# modified:  extensions/publishfiltering (modified content)
# modified:  extensions/reflectionfield (modified content)
# modified:  extensions/selectbox_link_field (modified content)
# modified:  extensions/subsectionfield (modified content)

>From this list it would appear that each of the 17 items in the extensions directory has been changed, but this is not truly the case. What actually happened was someone running chmod to give Apache access to the files.

It's a real problem, as I cannot tell which of the submodules actually has changes that I need to deal with. I'm also sure that there's probably some script-foo that I could to do automatically change filemode to false; but unfortunately my bash isn't so great, and I'm the most knowledgable in shell scripting at work.

I see three possible solutions to our woes:

1) It is/becomes possible to disable filemode when repositories are created; so only in the rare case that we need this feature would we have to change the git configuration.
2) Submodules defere the filemode preference to the parent repository; so that it only needs to be disabled once per project/repository.
3) I'm an idiot and all of my googling has failed to turn up an obvious/easy solution, and someone here points me to it.

Anyhow, thanks for listening, this email has been a long time coming.

Thanks,
Rowan Lewis



--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]