List of commits:
Subject Hash Author Date (UTC)
Do not allow random input as reference fe5d01344b9131edeb2812f72549bf74d8242653 Catalin(ux) M. BOIE 2016-03-14 16:31:59
Bump version to 0.50 485f0f8bae787bfbd7c52c9b934af977d8a2b871 Catalin(ux) M. BOIE 2016-03-11 23:32:34
Fixed bug add menu 47d48b6bbf669bd51d6876521fa288d217dda5d2 Catalin(ux) M. BOIE 2016-03-11 23:32:02
docker small fixes 1e68d0bbf8e16365068636a4e813c8ae0db2be5c Catalin(ux) M. BOIE 2016-03-11 23:31:34
Corrected a problem in spec file 8d28fc4e9d66d9a07d1148d893176a99533f8796 Catalin(ux) M. BOIE 2016-03-11 17:33:18
Bump version to v0.49 1481eafa69e1b2f2e2922a7b26acc3dc9a56f1a3 Catalin(ux) M. BOIE 2016-03-11 17:26:13
Just some comments 96f8542619d772c29b9bb07e4a066b7302d6f35c Catalin(ux) M. BOIE 2016-03-11 17:25:29
TODO clean-ups 3e34a304a204792b1a1a0b403c88e3164441066c Catalin(ux) M. BOIE 2016-03-09 17:27:10
Document web hooks and anonymous push 449e2d788ec06a49cc93f7d058df51ec351b9244 Catalin(ux) M. BOIE 2016-03-09 17:26:29
Do not log password in logs 4e183a15605f4b338863ea97192e46e0cf62cfe8 Catalin(ux) M. BOIE 2016-03-09 17:25:52
Do not continue to show objects if repo returned an error cd2a6a06d7867bb5da19108c6ab575e741b8b08e Catalin(ux) M. BOIE 2016-03-09 03:50:28
Make more clearer the events error message c76dd790a73e04318f0fc58b22d7701858e7dadf Catalin(ux) M. BOIE 2016-03-08 20:57:37
Accept 301 as a valid HTTP code 368f187c74e54052dbeeddfe9b5a533b155a62c2 Catalin(ux) M. BOIE 2016-03-08 20:57:01
We need to copy also the tags in the namespace to not get errors when pushing tags a6fa7c067b29f2d3ae400e6cb9117d17225ce047 Catalin(ux) M. BOIE 2016-03-06 21:21:07
Clean some items on TODO regarding mr 2383950909474e510897f37e46c2cf7cc762ec89 Catalin(ux) M. BOIE 2016-03-06 21:20:37
Lots of fixes for pull requests 54c410d144ae9ebdcc17ad8d11865a378e89f576 Catalin(ux) M. BOIE 2016-03-06 20:07:06
Replaced rg_bug_next_id with the more generic rg_repo_next_id 7c3131ac2bff3afb08983a2ebd23736ced070fb1 Catalin(ux) M. BOIE 2016-02-17 16:07:12
text correction: Amazon user must also have S3 rights 6a97f6ef92bb455b02434f35218224a3cae4cf02 Catalin(ux) M. BOIE 2016-02-14 12:11:29
for git:// access, organization field was missing 6c4479d982ea36941dc10db6d1b74012d1a75649 Catalin(ux) M. BOIE 2016-02-14 12:10:16
TODO changes bc6bf53c22bf2918e0fca8684406a753e4a335a3 Catalin(ux) M. BOIE 2016-02-14 12:09:47
Commit fe5d01344b9131edeb2812f72549bf74d8242653 - Do not allow random input as reference
Author: Catalin(ux) M. BOIE
Author date (UTC): 2016-03-14 16:31
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2016-03-14 16:31
Parent(s): 485f0f8bae787bfbd7c52c9b934af977d8a2b871
Signing key:
Tree: 60d132274fe3fcfcf75e00f40072914ff195eccf
File Lines added Lines deleted
inc/git.inc.php 30 12
inc/user/repo-page.php 13 1
File inc/git.inc.php changed (mode: 100644) (index 528eaae..55761de)
... ... function rg_git_log($path, $max, $from, $to, $also_patch)
807 807 $from_to = ''; $from_to = '';
808 808 } else if (empty($from)) { } else if (empty($from)) {
809 809 rg_log('from empty'); rg_log('from empty');
810 $from_to = ' ' . $to;
810 $from_to = $to;
811 811 } else if (strcmp($from, $rg_git_zero) == 0) { } else if (strcmp($from, $rg_git_zero) == 0) {
812 812 rg_log('from zero'); rg_log('from zero');
813 $from_to = ' ' . $rg_git_empty . '..' . $to;
813 $from_to = $rg_git_empty . '..' . $to;
814 814 $test_for_master = FALSE; $test_for_master = FALSE;
815 815 } else { } else {
816 $from_to = ' ' . $from . '..' . $to;
816 $from_to = $from . '..' . $to;
817 817 } }
818 818
819 819 if ($test_for_master) { if ($test_for_master) {
 
... ... function rg_git_log($path, $max, $from, $to, $also_patch)
858 858 . "body:%b%x00\"\"" . "body:%b%x00\"\""
859 859 . "notes:%N%x00\"\"" . "notes:%N%x00\"\""
860 860 . "%x00ROCKETGIT_END_OF_VARS%x00\"" . "%x00ROCKETGIT_END_OF_VARS%x00\""
861 . $from_to;
861 . ' ' . escapeshellarg($from_to);
862 862 $a = rg_exec($cmd); $a = rg_exec($cmd);
863 863 if ($a['ok'] != 1) { if ($a['ok'] != 1) {
864 864 rg_internal_error("error on log (" . $a['errmsg'] . ")"); rg_internal_error("error on log (" . $a['errmsg'] . ")");
 
... ... function rg_git_refs($repo_path)
1517 1517 return $ret; return $ret;
1518 1518 } }
1519 1519
1520 /*
1521 * Returns true if a ref is valid
1522 * @refs - the output of rg_git_refs
1523 * @type - 'tag' or 'branch'
1524 */
1525 function rg_git_ref_valid($refs, $type, $ref)
1526 {
1527 if (!isset($refs[$type]))
1528 return FALSE;
1529
1530 foreach ($refs[$type] as $name) {
1531 if (strcmp($name, $ref) == 0)
1532 return TRUE;
1533 }
1534
1535 return FALSE;
1536 }
1537
1520 1538 /* /*
1521 1539 * Returns an array with links to branches and tags * Returns an array with links to branches and tags
1540 * @refs is the output of rg_git_refs function
1522 1541 */ */
1523 function rg_git_branches_and_tags($repo_dir, $base_url, $current_ref)
1542 function rg_git_branches_and_tags($refs, $base_url, $current_ref)
1524 1543 { {
1525 rg_log_enter("git_branches_and_tags: repo_dir=$repo_dir base_url=$base_url"
1544 rg_log_enter("git_branches_and_tags: base_url=$base_url"
1526 1545 . " current_ref=$current_ref"); . " current_ref=$current_ref");
1527 1546
1528 1547 $ret = array(); $ret = array();
1529 $ret['HTML:branches_and_tags'] = "";
1548 $ret['HTML:branches_and_tags'] = '';
1530 1549
1531 $current = ltrim($current_ref, "/");
1550 $current = ltrim($current_ref, '/');
1532 1551 if (empty($current)) if (empty($current))
1533 $current = "branch/master";
1552 $current = 'branch/master';
1534 1553 //rg_log("DEBUG: current=[$current]"); //rg_log("DEBUG: current=[$current]");
1535 1554
1536 $refs = rg_git_refs($repo_dir);
1537 1555 $_l = array(); $_l = array();
1538 1556 foreach ($refs as $o => $list) { foreach ($refs as $o => $list) {
1539 1557 if (empty($list)) if (empty($list))
 
... ... function rg_git_branches_and_tags($repo_dir, $base_url, $current_ref)
1564 1582 $ret['HTML:branches_and_tags'] .= "</div>\n"; $ret['HTML:branches_and_tags'] .= "</div>\n";
1565 1583 } }
1566 1584
1567 rg_log("rg_git_branches_and_tags: ret:" . rg_array2string($ret));
1585 //rg_log("DEBUG: rg_git_branches_and_tags: ret:" . rg_array2string($ret));
1568 1586
1569 1587 rg_log_exit(); rg_log_exit();
1570 1588 return $ret; return $ret;
 
... ... function rg_git_parse_ref(&$paras)
1597 1615 } }
1598 1616
1599 1617 array_shift($paras); array_shift($paras);
1600 $val = array_shift($paras);
1618 $val = trim(array_shift($paras));
1601 1619 $ret['ref_url'] = "/" . $ret['ref_type'] . "/" . $val; $ret['ref_url'] = "/" . $ret['ref_type'] . "/" . $val;
1602 1620
1603 1621 $val = str_replace(',', '/', $val); $val = str_replace(',', '/', $val);
File inc/user/repo-page.php changed (mode: 100644) (index e8bc46c..b82135e)
... ... if (strcmp($_subop, "history") == 0) {
138 138 $_subsubop = empty($paras) ? "" : array_shift($paras); $_subsubop = empty($paras) ? "" : array_shift($paras);
139 139 $rg['source_menu'][$_subsubop] = 1; $rg['source_menu'][$_subsubop] = 1;
140 140
141 $refs = rg_git_refs($rg['repo_path']);
142 //rg_log_ml('DEBUG: refs: ' . print_r($refs, TRUE));
143
141 144 $type_ref = rg_git_parse_ref($paras); $type_ref = rg_git_parse_ref($paras);
142 145 $ref = $type_ref['ref_path']; $ref = $type_ref['ref_path'];
146 if (rg_git_ref_valid($refs, $type_ref['ref_type'], $type_ref['ref_val']) !== TRUE) {
147 $_a = array('branch', 'master');
148 $type_ref = rg_git_parse_ref($_a);
149 $ref = $type_ref['ref_path'];
150 }
151
152 //rg_log_ml('DEBUG: type_ref: ' . print_r($type_ref, TRUE));
143 153 $rg = array_merge($rg, $type_ref); $rg = array_merge($rg, $type_ref);
154 rg_log('DEBUG: ref=[' . $ref . ']');
155
144 156
145 $bt = rg_git_branches_and_tags($rg['repo_path'], $rg['ri']['url_repo'],
157 $bt = rg_git_branches_and_tags($refs, $rg['ri']['url_repo'],
146 158 $type_ref['ref_url']); $type_ref['ref_url']);
147 159 $rg = array_merge($rg, $bt); $rg = array_merge($rg, $bt);
148 160
Hints:
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://rocketgit.com/user/catalinux/rocketgit

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/catalinux/rocketgit

Clone this repository using git:
git clone git://git.rocketgit.com/user/catalinux/rocketgit

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main