projects
/
git-mirror.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Convert README to markdown
[git-mirror.git]
/
githook.py
diff --git
a/githook.py
b/githook.py
index 47a87e95115ac0092e1948ea2fd428c0a500c5ad..a503a470eee76de88b31c2c5442d139b47f1c441 100755
(executable)
--- a/
githook.py
+++ b/
githook.py
@@
-1,4
+1,4
@@
-#!/usr/bin/python3
+#!/usr/bin/
env
python3
# Copyright (c) 2015, Ralf Jung <post@ralfj.de>
# All rights reserved.
#
# Copyright (c) 2015, Ralf Jung <post@ralfj.de>
# All rights reserved.
#
@@
-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:
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:
repo.update_mirrors(ref, oldsha, newsha)
except Exception as e:
if repo is not None: