diff options
author | Jacob Vosmaer <jacob@gitlab.com> | 2016-06-23 16:59:57 +0200 |
---|---|---|
committer | Jacob Vosmaer <jacob@gitlab.com> | 2016-06-23 16:59:57 +0200 |
commit | d5860f45ad21848bbbceeb3823fca2b2820d6cde (patch) | |
tree | b93deea979faf416deeb727a53736a83f46c9726 /hooks/post-receive | |
parent | f2325a45c1ce4e6685f61a6e5d1ef0f351e34a18 (diff) | |
download | gitlab-shell-d5860f45ad21848bbbceeb3823fca2b2820d6cde.tar.gz |
ARGF does more than we want
ARGF is a virtual IO stream that treats the elements of ARGV as paths
to files to be opened. In practice, git-receive-pack will probably
never pass arguments to pre-receive and post-receive because it is not
supposed to (according to 'man 5 githooks'). In case it does, however
our hooks should not have the surprise behavior of treating those
arguments as files to be opened.
Diffstat (limited to 'hooks/post-receive')
-rwxr-xr-x | hooks/post-receive | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hooks/post-receive b/hooks/post-receive index da0ff41..34802e5 100755 --- a/hooks/post-receive +++ b/hooks/post-receive @@ -3,7 +3,7 @@ # This file was placed here by GitLab. It makes sure that your pushed commits # will be processed properly. -refs = ARGF.read +refs = $stdin.read key_id = ENV['GL_ID'] repo_path = Dir.pwd |