Two way git mirror: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
imported>Hendrik Brummermann mNo edit summary |
imported>Hendrik Brummermann added support for tags |
||
| (7 intermediate revisions by the same user not shown) | |||
| Line 37: | Line 37: | ||
git fetch --all -p |
git fetch --all -p |
||
# push branches from sourceforge to github and via versa. |
# push branches from sourceforge to github and via versa. |
||
git push github "refs/remotes/sourceforge/*:refs/heads/*" |
git push github "refs/remotes/sourceforge/*:refs/heads/*" "refs/tags/*:refs/tags/*" |
||
git push sourceforge "refs/remotes/github/*:refs/heads/*" |
git push sourceforge "refs/remotes/github/*:refs/heads/*" "refs/tags/*:refs/tags/*" |
||
} |
} |
||
| Line 76: | Line 76: | ||
// validate repository name to prevent injection and traversing attacks |
// validate repository name to prevent injection and traversing attacks |
||
$repo = $_REQUEST['repository']; |
$repo = $_REQUEST['repository']; |
||
if (!preg_match('/^[a-zA-Z0-9]$/', $repo)) { |
if (!preg_match('/^[a-zA-Z0-9]+$/', $repo)) { |
||
die('invalid repository name'); |
die('invalid repository name'); |
||
} |
} |
||