xaizek / rocketgit (License: AGPLv3+) (since 2018-12-09)
Light and fast Git hosting solution suitable to serve both as a hub or as a personal code storage with its tickets, pull requests, API and much more.
Commit ad3ce91ff291b9537ceca11995268e45a17407ef

tests: added a test with 500 10k commits
Author: Catalin(ux) M. BOIE
Author date (UTC): 2017-06-25 07:57
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2017-06-25 07:57
Parent(s): 17a1930f1661392629f3787cdd0150e971496512
Signing key:
Tree: 4b8992f3f77d3f897a72022fb438cd6aaa31fe6a
File Lines added Lines deleted
tests/git_big_push.php 25 2
File tests/git_big_push.php changed (mode: 100644) (index 3529ec5..09dc61e)
... ... putenv('git_username=' . $rg_ui['username']);
34 34 putenv('git_password=' . $rg_ui['pass']); putenv('git_password=' . $rg_ui['pass']);
35 35 putenv('GIT_ASKPASS=' . dirname(__FILE__) . '/ask_pass'); putenv('GIT_ASKPASS=' . dirname(__FILE__) . '/ask_pass');
36 36
37 $remote = escapeshellarg($repo['clone_url_http']);
38
39
40 rg_log('');
41 rg_log_enter('Testing push with a lot of small objects...');
42 $r = rg_exec('mkdir -p temp_repos && cd temp_repos'
43 . ' && rm -rf git_small_obj && mkdir git_small_obj && cd git_small_obj'
44 . ' && export GIT_CURL_VERBOSE=1 GIT_TRACE=1 GIT_TRACE_PACKET=1'
45 . ' && git init'
46 . ' && git remote add origin ' . $remote
47 . ' && (for i in `seq 0 500`; do'
48 . ' dd if=/dev/urandom of=a-${i} bs=10000 count=1'
49 . ' && git add a-${i}'
50 . ' && git commit -m "aaa-${i}";'
51 . ' done)'
52 . ' && git push --force origin master',
53 '', FALSE, FALSE);
54 if ($r['ok'] != 1) {
55 rg_log_ml('Could not push lots of small files: ' . $r['errmsg'] . '!');
56 exit(1);
57 }
58 rg_log_exit();
59 //system('rm -rf temp_repos/git_small_obj');
60
37 61
38 62 rg_log(''); rg_log('');
39 63 rg_log_enter('Testing push with a big file...'); rg_log_enter('Testing push with a big file...');
40 $remote = escapeshellarg($repo['clone_url_http']);
41 64 $r = rg_exec('mkdir -p temp_repos && cd temp_repos' $r = rg_exec('mkdir -p temp_repos && cd temp_repos'
42 65 . ' && rm -rf git_big_push && mkdir git_big_push && cd git_big_push' . ' && rm -rf git_big_push && mkdir git_big_push && cd git_big_push'
43 66 . ' && git init' . ' && git init'
 
... ... if ($r['ok'] != 1) {
53 76 } }
54 77 $r = rg_exec('cd temp_repos/git_big_push' $r = rg_exec('cd temp_repos/git_big_push'
55 78 . ' && export GIT_CURL_VERBOSE=1 GIT_TRACE=1 GIT_TRACE_PACKET=1' . ' && export GIT_CURL_VERBOSE=1 GIT_TRACE=1 GIT_TRACE_PACKET=1'
56 . ' && git push origin master',
79 . ' && git push --force origin master',
57 80 '', FALSE, FALSE); '', FALSE, FALSE);
58 81 if ($r['ok'] != 1) { if ($r['ok'] != 1) {
59 82 if (!strstr($r['errmsg'], 'git config http.postBuffer')) { if (!strstr($r['errmsg'], 'git config http.postBuffer')) {
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://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