List of commits:
Subject Hash Author Date (UTC)
git_log2listing big changes e91fdef76511d586af30a3aa4b44273a1203bd36 Catalin(ux) M. BOIE 2019-09-30 19:54:38
typo 0ef09cd6e02fa3bf79e0a26b887badc103b03d87 Catalin(ux) M. BOIE 2019-09-30 19:53:56
Some more error testing for http_confirm test 1f36b1f55465c57e935b830e456d8f8044ec17da Catalin(ux) M. BOIE 2019-09-30 19:53:38
fixes: ignore some errors 584eef4cbfb5427eaae34d72ea99b94ec4da29a4 Catalin(ux) M. BOIE 2019-09-30 19:52:45
cache: functional test for timeout acaeca2fbceb797b0fb58f1c05bdd8d1f9025f25 Catalin(ux) M. BOIE 2019-09-30 19:51:35
Fixed rg_git_merge because it was broken 797a976065420525f9f2c6a096ae306ffa5ed78d Catalin(ux) M. BOIE 2019-09-30 19:50:41
Disable GC when serving requests from web/fetch/push; we will do it from cron fd16c96f5f0a6d24e0c6aaf45c5a02833579667a Catalin(ux) M. BOIE 2019-09-30 19:48:49
git: fixes display of filenames which are not UTF-8 valid 83b6f641a547a4652aad6e921486d2b91cffdb9f Catalin(ux) M. BOIE 2019-09-30 19:46:07
rg_change_pass missed a log file name e49fc9f8c896414098713e418205d97b2e594c1f Catalin(ux) M. BOIE 2019-09-22 09:32:59
totp: remove a double DELETE sql query and invalidate cache after we remove the data from db ff22d7ddabc1c64a37fcb1749f54321974b0f8d3 Catalin(ux) M. BOIE 2019-09-22 09:28:30
selinux: added map (for packs) 911b2cffa2d754d466a31693af71d6c58639dd9d Catalin(ux) M. BOIE 2019-09-22 06:58:44
Do not allow : char in user name 460b846752c03368990b60efbbf12f74e229bda5 Catalin(ux) M. BOIE 2019-09-22 05:58:37
Do not allow : char in repo name b072ba3cd6c46e2ee7d07dc5890c8671d8462a09 Catalin(ux) M. BOIE 2019-09-22 05:56:56
Fix an XSS in repo description ee2d11f0b16b436d9e64a0c5ac57361d25e098e1 Catalin(ux) M. BOIE 2019-09-22 05:45:11
Do not allow a user name to start with minus; strlen -> mb_strlen 755f2a47e99dc3a56cee90b424ee8a9bd84236f8 Catalin(ux) M. BOIE 2019-09-22 05:07:01
Do not allow a repo to start with minus; strlen -> mb_strlen 8ac45126805015c868ae8054ea328dc5a16cf31c Catalin(ux) M. BOIE 2019-09-22 05:06:41
Limit the desciption of the project to 100 chars to be able to pack more repos per page 1d2714726347b1eb9f113bd9c4d65d301d6502bd Catalin(ux) M. BOIE 2019-09-22 04:59:11
Changed CIF 47e6a7b3939898729d4344b8e3a01ac0dbd3e3b1 Catalin(ux) M. BOIE 2019-09-22 04:42:59
Added git_log1_strange.php to generate strange filenames 66083c9e3e6633c953bd5e77f28d993687ef2b73 Catalin(ux) M. BOIE 2019-09-17 20:01:10
tests: cosmetic stuff 7688f7b901e0fe3a94e2fcb62755af159212d053 Catalin(ux) M. BOIE 2019-09-17 20:00:04
Commit e91fdef76511d586af30a3aa4b44273a1203bd36 - git_log2listing big changes
Author: Catalin(ux) M. BOIE
Author date (UTC): 2019-09-30 19:54
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2019-09-30 19:54
Parent(s): 0ef09cd6e02fa3bf79e0a26b887badc103b03d87
Signer:
Signing key:
Signing status: N
Tree: 5800f8567a32242ca9476596664272ccbd15116b
File Lines added Lines deleted
inc/git.inc.php 64 52
File inc/git.inc.php changed (mode: 100644) (index 4c5129a..9b4fe90)
... ... function rg_git_content_by_file($treeish, $file)
2296 2296 */ */
2297 2297 function rg_git_log2listing($log, $rg, $commit_table) function rg_git_log2listing($log, $rg, $commit_table)
2298 2298 { {
2299 if ($log === FALSE)
2300 return rg_template('repo/not_init.html', $rg, TRUE/*xss*/);
2299 rg_log_enter('git_log2listing');
2301 2300
2302 $ret = '';
2301 while (1) {
2302 if ($log === FALSE) {
2303 $ret = rg_template('repo/not_init.html', $rg, TRUE /*xss*/);
2304 break;
2305 }
2303 2306
2304 if ($commit_table) {
2305 // Show a short list of commits
2306 // Set 'url'
2307 foreach ($log as $index => $i)
2308 $log[$index]['vars']['commit_url'] =
2309 rg_xss_safe($rg['mr']['id'])
2310 . "#sha1-" . rg_xss_safe($i['vars']['sha1']);
2311 $ret .= rg_git_log_template($log, 'repo/log', $rg);
2312 }
2307 $ret = '';
2313 2308
2314 // TODO: move this into a template!
2315 $ret .= '<div style="margin-top: 8pt; margin-left: 8pt">' . "\n";
2316 foreach ($log as $junk => $i) {
2317 //rg_log_ml('DEBUG: i=' . print_r($i, TRUE));
2309 if ($commit_table) {
2310 // Show a short list of commits
2311 // Set 'url'
2312 foreach ($log as $index => $i)
2313 $log[$index]['vars']['commit_url'] =
2314 rg_xss_safe($rg['mr']['id'])
2315 . "#sha1-" . rg_xss_safe($i['vars']['sha1']);
2316 $ret .= rg_git_log_template($log, 'repo/log', $rg);
2317 }
2318 2318
2319 // Some info about commit
2320 $ret .= "<b>"
2321 . "<a name=\"sha1-" . rg_xss_safe($i['vars']['sha1']) . "\">"
2322 . "Commit " . rg_xss_safe($i['vars']['sha1'])
2323 . "</a></b> - " . rg_xss_safe($i['vars']['subject']) . "\n";
2319 // TODO: move this into a template!
2320 $ret .= '<div style="margin-top: 8pt; margin-left: 8pt">' . "\n";
2321 foreach ($log as $junk => $i) {
2322 //rg_log_ml('DEBUG: i=' . print_r($i, TRUE));
2324 2323
2325 if (!empty($i['vars']['body']))
2326 $ret .= "<br />\n"
2327 . nl2br(rg_xss_safe($i['vars']['body']));
2324 // Some info about commit
2325 $ret .= "<b>"
2326 . "<a name=\"sha1-" . rg_xss_safe($i['vars']['sha1']) . "\">"
2327 . "Commit " . rg_xss_safe($i['vars']['sha1'])
2328 . "</a></b> - " . rg_xss_safe($i['vars']['subject']) . "\n";
2328 2329
2329 $ret .= "<br /><b>Author</b>: " . rg_xss_safe($i['vars']['author name']);
2330 if (!empty($i['vars']['body']))
2331 $ret .= "<br />\n"
2332 . nl2br(rg_xss_safe($i['vars']['body']));
2330 2333
2331 $ret .= "<br /><b>Author date (UTC)</b>: "
2332 . gmdate("Y-m-d H:i", $i['vars']['author date']);
2334 $ret .= "<br /><b>Author</b>: " . rg_xss_safe($i['vars']['author name']);
2333 2335
2334 if (!empty($i['vars']['committer name']))
2335 $ret .= "<br /><b>Committer</b>: "
2336 . rg_xss_safe($i['vars']['committer name']);
2336 $ret .= "<br /><b>Author date (UTC)</b>: "
2337 . gmdate("Y-m-d H:i", $i['vars']['author date']);
2337 2338
2338 $ret .= '<br /><b>Commit date (UTC)</b>: '
2339 . gmdate("Y-m-d H:i", $i['vars']['committer date']);
2339 if (!empty($i['vars']['committer name']))
2340 $ret .= "<br /><b>Committer</b>: "
2341 . rg_xss_safe($i['vars']['committer name']);
2340 2342
2341 $ret .= '<br /><b>Tree</b>: ' . $i['vars']['tree'];
2343 $ret .= '<br /><b>Commit date (UTC)</b>: '
2344 . gmdate("Y-m-d H:i", $i['vars']['committer date']);
2342 2345
2343 if (!empty($i['vars']['parents']))
2344 $ret .= '<br /><b>Parents</b>: '
2345 . $i['vars']['parents'];
2346 $ret .= '<br /><b>Tree</b>: ' . $i['vars']['tree'];
2346 2347
2347 if (!empty($i['vars']['sign_key']))
2348 $ret .= '<br /><b>Signing key</b>: '
2349 . $i['vars']['sign_key'];
2348 if (!empty($i['vars']['parents']))
2349 $ret .= '<br /><b>Parents</b>: '
2350 . $i['vars']['parents'];
2350 2351
2351 // stats
2352 $r = rg_git_files_stats($i['vars']['sha1'], $i['files'],
2353 'repo/fstat');
2354 if ($r === FALSE)
2355 return "Internal error";
2356 $ret .= $r;
2352 if (!empty($i['vars']['sign_key']))
2353 $ret .= '<br /><b>Signing key</b>: '
2354 . $i['vars']['sign_key'];
2357 2355
2358 // diff
2359 //rg_log_ml("DEBUG: i[files]=" . print_r($i['files'], TRUE));
2360 $r = rg_git_diff($i['vars']['sha1'], $i['files'],
2361 'repo/diff.html');
2362 if ($r === FALSE)
2363 return "Internal error";
2364 $ret .= $r;
2356 // stats
2357 $r = rg_git_files_stats($i['vars']['sha1'], $i['files'],
2358 'repo/fstat');
2359 if ($r === FALSE) {
2360 $ret = FALSE;
2361 break;
2362 }
2363 $ret .= $r;
2364
2365 // diff
2366 //rg_log_ml("DEBUG: i[files]=" . print_r($i['files'], TRUE));
2367 $r = rg_git_diff($i['vars']['sha1'], $i['files'],
2368 'repo/diff.html');
2369 if ($r === FALSE) {
2370 $ret = FALSE;
2371 break;
2372 }
2373 $ret .= $r;
2374 }
2375 break;
2365 2376 } }
2366 2377
2367 2378 if (!empty($rg['HTML:commit_labels'])) if (!empty($rg['HTML:commit_labels']))
2368 2379 $ret .= '<br />' . $rg['HTML:commit_labels']; $ret .= '<br />' . $rg['HTML:commit_labels'];
2369 2380 $ret .= '</div>' . "\n"; $ret .= '</div>' . "\n";
2370 2381
2382 rg_log_exit();
2371 2383 return $ret; return $ret;
2372 2384 } }
2373 2385
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