-
Notifications
You must be signed in to change notification settings - Fork 853
git: worktree, implement core.filemode. Related to #771 #1712
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
Conversation
|
Hi @pjbgf , would you mind taking a look at this PR when you have a moment? |
pjbgf
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kayoch1n thanks for proposing these changes. 🙇
pjbgf
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kayoch1n Thanks for working on this. 🙇
This PR tries to implement the
core.filemoderelated to the Windows issue 771. In this PR, thecore.filemodeoption in config will be honored and only take effect during hash comparison. When an index entry is anexecutable and
core.filemodeisfalse, a mode value of 0644 will be used for hashing purposes—while the actual mode value stored in the index remains unchanged.It is
trueby default and hence the actual mode value will be used in hash.AFAIK, C git will automatically set this option before
init/clone, andgit initresults in a value offalseby default on Windows. Unlike C git, there is no such auto detection in go-git by now. For windows users, if they want to use go-git to init or clone a repo on disk, they should explicitly set this config option and flush the config to disk.