Coder Social home page Coder Social logo

gitperms's People

Contributors

harleypig avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

gitperms's Issues

If no note is found on checkout handle_metadata dies badly

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).

Don't chmod symlinks

If chmod will overwrite the original file's mode when applying a mode for a symlink.

Want a patch?

/selinux/enforce may not exist.

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,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.