Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: evilmartians/lefthook
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.0.7
Choose a base ref
...
head repository: evilmartians/lefthook
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.0.8
Choose a head ref
  • 2 commits
  • 25 files changed
  • 2 contributors

Commits on Dec 5, 2025

  1. fix: do not escape custom templates in command replacement (#1213)

    Custom templates (defined in the 'templates' config section) should not
    be shell-escaped when replacing them in commands, as they often contain
    shell commands themselves that need to be executed directly.
    
    This commit modifies the ReplaceAndSplit function to only escape file
    templates (like {staged_files}, {push_files}, etc.) which represent
    file paths that may contain special characters, while leaving custom
    templates unescaped.
    
    Example:
      templates:
        use-mise: eval "$(mise env)"
    
      Before: 'eval "$(mise env)"' prettier {staged_files}
      After:  eval "$(mise env)" prettier file1.js
    
    Fixes the issue where custom templates were being incorrectly wrapped
    in quotes, causing shell command execution failures.
    joevin-slq-docto authored Dec 5, 2025
    Configuration menu
    Copy the full SHA
    0324368 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    22171e0 View commit details
    Browse the repository at this point in the history
Loading