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 cf9cc661bca7194dbb65acdcbb253552be7acf70

Fixed state_set function
When a state value is not set, state_get return empty string not FALSE!
Author: Catalin(ux) M. BOIE
Author date (UTC): 2015-04-08 21:11
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2015-04-08 21:11
Parent(s): d931fe7c4170643e46404c32659f4dce031d4cb4
Signing key:
Tree: 1d1511f083302f198e3ef00bb99cbab5dc56374d
File Lines added Lines deleted
TODO 2 0
inc/state.inc.php 5 1
File TODO changed (mode: 100644) (index f976f0b..1d0ca38)
31 31 [ ] [ ]
32 32
33 33 == BEFORE NEXT RELEASE == == BEFORE NEXT RELEASE ==
34 [ ] Add right 'allow bad commit messages'.
35 [ ] Add a new section in 'Rights' to enforce a regex on the commit message.
34 36 [ ] Merge requests are not ok - still using files. [ ] Merge requests are not ok - still using files.
35 37 But, we also insert entries in database! But, we also insert entries in database!
36 38 [ ] Need to add comments for merge request. Find a way to propagate them in the [ ] Need to add comments for merge request. Find a way to propagate them in the
File inc/state.inc.php changed (mode: 100644) (index f9f0e17..360640e)
... ... function rg_state_set($db, $var, $value)
95 95 $ret = FALSE; $ret = FALSE;
96 96 while (1) { while (1) {
97 97 $params = array("var" => $var, "value" => $value); $params = array("var" => $var, "value" => $value);
98 if (rg_state_get($db, $var) === FALSE) {
98 $old = rg_state_get($db, $var);
99 if (strcmp($old, $value) == 0)
100 return TRUE;
101
102 if ($old === "") {
99 103 $sql = "INSERT INTO state (var, value)" $sql = "INSERT INTO state (var, value)"
100 104 . " VALUES (@@var@@, @@value@@)"; . " VALUES (@@var@@, @@value@@)";
101 105 } else { } else {
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