From 214a383923d8151559635bff6289b80ddeb49b4b Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Fri, 15 Jun 2018 22:25:43 +0100 Subject: [PATCH] repo git: Always make sure LFS pre-push hook is executable --- Sparkles/Git/GitRepository.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Sparkles/Git/GitRepository.cs b/Sparkles/Git/GitRepository.cs index 6862a747..576d5648 100644 --- a/Sparkles/Git/GitRepository.cs +++ b/Sparkles/Git/GitRepository.cs @@ -81,6 +81,12 @@ namespace Sparkles.Git { git_config = new GitCommand (LocalPath, "config core.sshCommand " + GitCommand.FormatGitSSHCommand (auth_info)); git_config.StartAndWaitForExit(); + + string pre_push_hook_path = Path.Combine (LocalPath, ".git", "hooks", "pre-push"); + + // TODO: Use proper API + var chmod = new Command ("chmod", "700 " + pre_push_hook_path); + chmod.StartAndWaitForExit (); }