projects
/
git-mirror.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
91149b3
)
the post-receive hook really should be executable; run it directly
author
Ralf Jung
<post@ralfj.de>
Mon, 27 Mar 2017 16:59:55 +0000
(18:59 +0200)
committer
Ralf Jung
<post@ralfj.de>
Mon, 27 Mar 2017 16:59:55 +0000
(18:59 +0200)
git_mirror.py
patch
|
blob
|
history
diff --git
a/git_mirror.py
b/git_mirror.py
index 23f6545518993bff13e8cad2c4a84e8f3c931833..12075bff8d4768ab74aa84b44ab8e84a11b770b6 100644
(file)
--- a/
git_mirror.py
+++ b/
git_mirror.py
@@
-177,7
+177,7
@@
class Repo:
# Now run the post-receive hooks. This will *also* push the changes to all mirrors, as we
# are one of these hooks!
os.putenv("GIT_MIRROR_SOURCE", mirror) # tell ourselves which repo we do *not* have to update
# Now run the post-receive hooks. This will *also* push the changes to all mirrors, as we
# are one of these hooks!
os.putenv("GIT_MIRROR_SOURCE", mirror) # tell ourselves which repo we do *not* have to update
- with subprocess.Popen(['
/bin/sh', '
hooks/post-receive'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) as p:
+ with subprocess.Popen(['hooks/post-receive'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) as p:
(stdout, stderr) = p.communicate("{} {} {}\n".format(oldsha, newsha, ref).encode('utf-8'))
stdout = stdout.decode('utf-8')
if p.returncode:
(stdout, stderr) = p.communicate("{} {} {}\n".format(oldsha, newsha, ref).encode('utf-8'))
stdout = stdout.decode('utf-8')
if p.returncode: