harleypig / gitperms Goto Github PK
View Code? Open in Web Editor NEWHandle permissions in a git repository.
Handle permissions in a git repository.
If no note is found on a checkout then handle_metadata reports that then dies with a scary sounding error.
Instead of trying to set metadata when there is no note, if we are in a post-checkout hook just save metadata (a new branch won't have a note, and we can safely assume permissions are as desired, at least initially).
If we are in a post-merge just die gracefully with a note about no note existing and the user should probably create one (with text explaining how to do it).
If chmod will overwrite the original file's mode when applying a mode for a symlink.
Want a patch?
The '/selinux/enforce' file may not exist. If it does not, then 'cat' outputs "cat: /selinux/enforce: No such file or directory".
The following patch prevents this:
diff --git a/handle_metadata b/handle_metadata
index d8642c8..9212b70 100755
--- a/handle_metadata
+++ b/handle_metadata
@@ -35,7 +35,7 @@ my $topdir = get_toplevel();
chdir $topdir
or die "Unable to change to git top level directory: $!\n";
-my $se_enforcing = qx/cat \/selinux\/enforce/;
+my $se_enforcing = qx/if [[ -f \/selinux\/enforce ]]; then cat \/selinux\/enforce; fi/;
GetOptions(
'create-on-missing' => \my $create_on_missing,
Extended attributes appears to be set to 0 ... verify or fix.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.