<?php
rg_log("/inc/repo/repo");
$_repo = "";
if ($rg_ui['uid'] == 0) {
$_repo .= "You do not have access here!";
return;
}
$name = rg_var_str("name");
$max_commit_size = rg_var_uint("max_commit_size");
$max_users = rg_var_uint("max_users");
$description = rg_var_str("description");
$master_repo_id = rg_var_uint("master_repo_id");
$rights = @rg_rights_a2s($_REQUEST['rights']);
$repo_id = rg_var_uint("repo_id");
$q = rg_var_str("q");
$masters = rg_var_uint("masters");
// menu
$_url = rg_re_url($op);
$second_menu = array(
"create_repo" => array(
"text" => "Create",
"url" => "&subop=1"
),
"list_repos" => array(
"text" => "List",
"url" => "&subop=2"
),
"search_repo" => array(
"text" => "Search",
"url" => "&subop=3"
)
);
$_body = "";
$errmsg = array();
switch ($subop) {
case 1: // create
if ($doit == 1) {
$_r = rg_repo_create($db, $master_repo_id, $rg_ui, $name,
$max_commit_size, $description, $rights, $max_users);
if ($_r === FALSE)
$_body .= rg_repo_error();
else
$_body .= "OK!";
} else {
$_action = "Create";
// defaults
$rights = $rg_repo_rights_default;
include($INC . "/repo/repo.form.php");
$_body .= $_form;
}
break;
case 2: // list
$_body .= rg_repo_list($db, "", $rg_ui);
break;
case 3: // search
if ($doit == 1) {
$_body .= rg_repo_search($db, $q, $masters);
} else {
include($INC . "/repo/search.form.php");
$_body .= $_form;
}
break;
}
$_repo .= $_body;
?>
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"
Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/rocketgit
Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/rocketgit
You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a
pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master