Comments (2)
No. Yes, git stores executable bits, but chezmoi is designed to work with all version control systems (some of which do not presreve executable bits) and all file systems (some of which do not have executable bits). Also, such a feature would introduce ambiguity: for the target file to have the executable bit set, is it necessary for the source file to have the executable_
attribute, the executable bit set, or both?
For more info on chezmoi's design, see https://www.chezmoi.io/user-guide/frequently-asked-questions/design/#why-does-chezmoi-use-weird-filenames.
from chezmoi.
but chezmoi is designed to work with all version control systems (some of which do not presreve executable bits)
Which ones don't? From some quick research it looks like git, svn, fossil, mercurial, bzr and darcs have some facility for marking files as executable (although in some it must be done explicitly when adding the file).
To be clear I am not suggesting removing the executable_
attribute, but allowing you to also use the executable bit to signify that it is executable. So if you do use a VCS that doesn't keep track of an executable flag, you can still use that.
Support for this could even be in a configuration option that needs to be opted in to.
and all file systems (some of which do not have executable bits)
true. But if the target file system doesn't have an executable bit, then the executable_
attribute doesn't really do anything does it? And if your target file system does have an executable bit, and your source file system doesn't, you can still use the executable_
flag.
such a feature would introduce ambiguity: for the target file to have the executable bit set, is it necessary for the source file to have the executable_ attribute, the executable bit set, or both?
I would think either. That is, the target file is executable if the source file has the executable_
attribute OR it has the executable bit set and doesn't have any of the attributes indicating a script, or a template (run_
, .tmpl
).
In pseudocode something like:
targetIsExecutable = source.attributes.includes("executable") || (source.permissions.executable && source.isNormalFile())
from chezmoi.
Related Issues (20)
- `chezmoid apply` (and `dump`) cause a Go panic HOT 3
- Option for `.chezmoiexternal` to add files directly to target and not in source state HOT 3
- Option to include directories outside of Chezmoi's root HOT 1
- Add support for template prefix HOT 3
- Support `failure` hooks and scripts HOT 7
- `--follow` and `--recursive` add seem to conflict
- Extend re-add command to add new files
- .chezmoiignore thinks closing braces are a pattern HOT 3
- Trouble ignoring certain files
- `chezmoi edit-config-template` creates initial template with world-writable permissions HOT 2
- Using environment variable in onepasswordRead HOT 2
- Support chmod in attributes HOT 5
- Powershell one-line install on Windows 11 error - update script at https://get.chezmoi.io/ps1 HOT 1
- run time bug when `chezmoi doctor` invoked HOT 6
- Make accidental removal harder
- forced update says "Already up to date." HOT 1
- Ability to dry-run / diff scripts HOT 5
- Local repository. HOT 7
- Documentation update "Why do I get a blank buffer or empty file when running chezmoi edit" HOT 1
- Import/merge separate source directories? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chezmoi.