1
0

100-fix-missing-hooks-dir.patch 1005 B

123456789101112131415161718192021222324252627
  1. From d0409ae1164030913801d37ce5425ed93529c69d Mon Sep 17 00:00:00 2001
  2. From: Daniel Dickinson <gitolite@daniel.thecshore.com>
  3. Date: Fri, 1 Jul 2016 00:37:23 -0400
  4. Subject: [PATCH] Conf::Store: Fix missing hooks dir for symlink
  5. At least when doing 'gitolite setup -pk user.pub', the
  6. symlinking of hooks fails because the hooks directory
  7. does not exist. Make sure we create it if it's missing.
  8. ---
  9. src/lib/Gitolite/Conf/Store.pm | 1 +
  10. 1 file changed, 1 insertion(+)
  11. diff --git a/src/lib/Gitolite/Conf/Store.pm b/src/lib/Gitolite/Conf/Store.pm
  12. index 5568b3f..aac90d4 100644
  13. --- a/src/lib/Gitolite/Conf/Store.pm
  14. +++ b/src/lib/Gitolite/Conf/Store.pm
  15. @@ -363,6 +363,7 @@ sub store_common {
  16. chmod 0755, "$rc{GL_ADMIN_BASE}/hooks/gitolite-admin/post-update";
  17. $hook_reset++;
  18. }
  19. + _mkdir("$repo.git/hooks");
  20. # propagate user-defined (custom) hooks to all repos
  21. ln_sf( "$rc{LOCAL_CODE}/hooks/common", "*", "$repo.git/hooks" ) if $rc{LOCAL_CODE};
  22. --
  23. 2.7.4