Skip to content

Commit

Permalink
Fixes #4558: refactoring superglobals in the commit-msg git script. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemadison13 authored Jul 15, 2022
1 parent 38555a7 commit 883c69c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/git-hooks/commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
echo "Executing .git/hooks/commit-msg...\n";
$repo_root = getcwd();

$original_argv = $_SERVER['argv'];
$original_argv = $argv;
$commit_msg = rtrim(file_get_contents($original_argv[1]), "\n");

// Construct pseudo `blt commit-msg $commit_msg` call.
$_SERVER['argv'] = [
$argv = [
$repo_root . '/bin/blt',
'internal:git-hook:execute:commit-msg',
$commit_msg,
];
$_SERVER['argc'] = count($_SERVER['argv']);
$argc = count($argv);

require __DIR__ . '/../../bin/blt-robo.php';

0 comments on commit 883c69c

Please sign in to comment.