mirror of
https://gh.wpcy.net/https://github.com/CaptainCore/captaincore.git
synced 2026-04-22 18:49:42 +08:00
17 lines
340 B
PHP
Executable file
17 lines
340 B
PHP
Executable file
#! /usr/bin/env php
|
|
<?php
|
|
|
|
##
|
|
## git_diff=`git diff HEAD $file`
|
|
## new_permissions=`captaincore utils git-diff-permission-check "$git_diff"`
|
|
##
|
|
|
|
preg_match_all(
|
|
'/old mode \d+(\d{3})\nnew mode \d+(\d{3})/',
|
|
$argv[1],
|
|
$matches, PREG_PATTERN_ORDER
|
|
);
|
|
|
|
if ( is_array($matches[1]) and is_array($matches[2])) {
|
|
echo $matches[1][0];
|
|
}
|