Skip to content

Conversation

@vedelaar
Copy link

@vedelaar vedelaar commented Sep 13, 2018

and not the whole hooks directory.

ln -s ../git-hooks .git/hooks
ln -s ../git-hooks/pre-commit .git/hooks/pre-commit

#17

…le hooks directory.

ln -s ../git-hooks .git/hooks
ln -s ../git-hooks/pre-commit .git/hooks/pre-commit
Copy link
Owner

@michalrus michalrus left a comment

Choose a reason for hiding this comment

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

A very nice idea and a real problem, indeed, thanks!

[ -d "$root" ] || exit 1

owndir="$(cd "$(dirname "$0")"; pwd -P)"
owndir="$(dirname "$(readlink -f "$0")")"
Copy link
Owner

Choose a reason for hiding this comment

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

readlink -f is GNU, not POSIX, so it’ll break on macOS or other *BSD systems.

Could you do it portably?

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