-
-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Closed
Description
- Gitea version (or commit ref): v1.1
- Git version: 2.10.1 (Apple Git-78)
- Operating system: OSX/Ubuntu
- Database (use
[x]
):- PostgreSQL
- MySQL
- MSSQL
- SQLite
- Can you reproduce the bug at https://try.gitea.io:
- Yes (provide example URL)
- No
- Not relevant
- Log gist:
Description
Hi, I have tested some simple scripts from here:
https://git-scm.com/book/uz/v2/Customizing-Git-An-Example-Git-Enforced-Policy
and put that as update-hook via Git-Hooks->update
#!/usr/bin/env ruby
$refname = ARGV[0]
$oldrev = ARGV[1]
$newrev = ARGV[2]
$user = ENV['USER']
puts "Enforcing Policies..."
puts "(#{$refname}) (#{$oldrev[0,6]}) (#{$newrev[0,6]})"
But it seems that the ARGV is empty.
Also a very simple
#!/bin/bash
echo "$1 $2 $3"
doesn't print out anything.
From where in the "hook call" of gitea I will be able to read the refs?