@@ -46,18 +46,33 @@ var (
46
46
Usage : "Delegate pre-receive Git hook" ,
47
47
Description : "This command should only be called by Git" ,
48
48
Action : runHookPreReceive ,
49
+ Flags : []cli.Flag {
50
+ cli.BoolFlag {
51
+ Name : "debug" ,
52
+ },
53
+ },
49
54
}
50
55
subcmdHookUpdate = cli.Command {
51
56
Name : "update" ,
52
57
Usage : "Delegate update Git hook" ,
53
58
Description : "This command should only be called by Git" ,
54
59
Action : runHookUpdate ,
60
+ Flags : []cli.Flag {
61
+ cli.BoolFlag {
62
+ Name : "debug" ,
63
+ },
64
+ },
55
65
}
56
66
subcmdHookPostReceive = cli.Command {
57
67
Name : "post-receive" ,
58
68
Usage : "Delegate post-receive Git hook" ,
59
69
Description : "This command should only be called by Git" ,
60
70
Action : runHookPostReceive ,
71
+ Flags : []cli.Flag {
72
+ cli.BoolFlag {
73
+ Name : "debug" ,
74
+ },
75
+ },
61
76
}
62
77
)
63
78
@@ -138,7 +153,7 @@ func runHookPreReceive(c *cli.Context) error {
138
153
return nil
139
154
}
140
155
141
- setup ("hooks/pre-receive.log" , false )
156
+ setup ("hooks/pre-receive.log" , c . Bool ( "debug" ) )
142
157
143
158
if len (os .Getenv ("SSH_ORIGINAL_COMMAND" )) == 0 {
144
159
if setting .OnlyAllowPushIfGiteaEnvironmentSet {
@@ -273,7 +288,7 @@ func runHookPostReceive(c *cli.Context) error {
273
288
return nil
274
289
}
275
290
276
- setup ("hooks/post-receive.log" , false )
291
+ setup ("hooks/post-receive.log" , c . Bool ( "debug" ) )
277
292
278
293
if len (os .Getenv ("SSH_ORIGINAL_COMMAND" )) == 0 {
279
294
if setting .OnlyAllowPushIfGiteaEnvironmentSet {
0 commit comments