projects
/
git-mirror.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8978aa1
)
githook: slightly more robust against weird input
author
Ralf Jung
<post@ralfj.de>
Mon, 8 Jun 2015 19:52:44 +0000
(21:52 +0200)
committer
Ralf Jung
<post@ralfj.de>
Mon, 8 Jun 2015 19:52:44 +0000
(21:52 +0200)
githook.py
patch
|
blob
|
history
diff --git
a/githook.py
b/githook.py
index 47a87e95115ac0092e1948ea2fd428c0a500c5ad..5dd849769ee30415fcf64017888a4b79251fc3cf 100755
(executable)
--- a/
githook.py
+++ b/
githook.py
@@
-41,7
+41,10
@@
if __name__ == "__main__":
repo = repos[reponame]
# parse the information we get from stdin. we trust this information.
for line in sys.stdin:
- (oldsha, newsha, ref) = line.split()
+ line = line.split()
+ if len(line) == 0: continue
+ assert len(line) == 3
+ (oldsha, newsha, ref) = line
repo.update_mirrors(ref, oldsha, newsha)
except Exception as e:
if repo is not None: