Opened 14 months ago

Last modified 14 months ago

#31742 new enhancement

Write a script or makefile target to install git hooks

Reported by: rl1987 Owned by:
Priority: Medium Milestone:
Component: Core Tor/Tor Version:
Severity: Normal Keywords: easy
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


At this point we have to manually copy git hook scripts into .git/hooks directory and make them executable. Having a scripted way to do this would be more convenient.

Child Tickets

Change History (1)

comment:1 Changed 14 months ago by teor

Here are some things we should be aware of:

  • it should be a script, which can optionally be called by a Makefile target
    • some people have (upstream merging) git directories with hooks, but no builds
  • We need a manual step: it's not safe to have executable scripts update themselves
  • The manual step should take its paths from:
    • environmental variables, to allow users to update all their git repositories at the same time
    • the current git working directory, according to the git command
      • if the user is in a worktree, the scripts should be copied into the working directory, not the worktree
Note: See TracTickets for help on using tickets.