Skip to content

Update pre-commit #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update pre-commit #2

wants to merge 1 commit into from

Conversation

Muraveiko
Copy link

Не работал под windows ;(
egrep еще можно найти под windows, а вот awk найти сложно.

в readme
запускать из командной строки администратора

cd папка_проекта.git\hooks
mklink pre-commit путь\php-git-hooks\pre-commit

fix for windows  compatibility

$against = '4b825dc642cb6eb9a060e54bf8d69288fbee4904';
if ($rc == 0) {
$against = 'HEAD';
}

exec("git diff-index --cached --name-status $against | egrep '^(A|M)' | awk '{print $2;}'", $output);
// exec("git diff-index --cached --name-status $against | egrep '^(A|M)' | awk '{print $2;}'", $output);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нет смысла оставлять старый код, если он переписан.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants