Skip to content

Commit f2caeca

Browse files
committed
doc: updated changelog and documentation
Signed-off-by: Javi Fontan <[email protected]>
1 parent b9ad8c0 commit f2caeca

File tree

3 files changed

+41
-24
lines changed

3 files changed

+41
-24
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
- Changed cli to be able to specify different formats ([#866](https://github.com/src-d/gitbase/issues/866))
10+
911
## [0.21.0-beta3] - 2019-06-19
1012

1113
### Fixed

docs/using-gitbase/configuration.md

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -86,37 +86,35 @@ Help Options:
8686
8787
[server command options]
8888
--db= Database name (default: gitbase)
89-
-d, --directories= Path where the git repositories are located
90-
(standard and siva), multiple directories can
91-
be defined. Accepts globs.
92-
--depth= load repositories looking at less than
93-
<depth> nested subdirectories. (default: 1000)
94-
--host= Host where the server is going to listen
95-
(default: localhost)
96-
-p, --port= Port where the server is going to listen
97-
(default: 3306)
89+
-d, --directories= Path where standard git repositories are located,
90+
multiple directories can be defined.
91+
--format=[git|siva] Library format (default: git)
92+
--bucket= Bucketing level to use with siva libraries (default: 2)
93+
--bare Sets the library to use bare git repositories, used
94+
only with git format libraries
95+
--non-rooted Disables treating siva files as rooted repositories
96+
--host= Host where the server is going to listen (default:
97+
localhost)
98+
-p, --port= Port where the server is going to listen (default:
99+
3306)
98100
-u, --user= User name used for connection (default: root)
99101
-P, --password= Password used for connection
100-
-U, --user-file= JSON file with credentials list
101-
[$GITBASE_USER_FILE]
102+
-U, --user-file= JSON file with credentials list [$GITBASE_USER_FILE]
102103
-t, --timeout= Timeout in seconds used for connections
103104
[$GITBASE_CONNECTION_TIMEOUT]
104-
-i, --index= Directory where the gitbase indexes
105-
information will be persisted. (default:
106-
/var/lib/gitbase/index) [$GITBASE_INDEX_DIR]
105+
-i, --index= Directory where the gitbase indexes information will
106+
be persisted. (default: /var/lib/gitbase/index)
107+
[$GITBASE_INDEX_DIR]
107108
--cache= Object cache size in megabytes (default: 512)
108109
[$GITBASE_CACHESIZE_MB]
109-
--parallelism= Maximum number of parallel threads per table.
110-
By default, it's the number of CPU cores. 0
111-
means default, 1 means disabled.
110+
--parallelism= Maximum number of parallel threads per table. By
111+
default, it's the number of CPU cores. 0 means
112+
default, 1 means disabled.
112113
--no-squash Disables the table squashing.
113114
--trace Enables jaeger tracing [$GITBASE_TRACE]
114-
-r, --readonly Only allow read queries. This disables
115-
creating and deleting indexes as well. Cannot
116-
be used with --user-file. [$GITBASE_READONLY]
117-
--no-git disable the load of git standard repositories.
118-
--no-siva disable the load of siva files.
115+
-r, --readonly Only allow read queries. This disables creating and
116+
deleting indexes as well. Cannot be used with
117+
--user-file. [$GITBASE_READONLY]
119118
-v Activates the verbose mode
120-
--log-level=[info|debug|warning|error|fatal] logging level (default: info)
121-
[$GITBASE_LOG_LEVEL]
119+
--log-level=[info|debug|warning|error|fatal] logging level (default: info) [$GITBASE_LOG_LEVEL]
122120
```

docs/using-gitbase/getting-started.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,20 @@ As of MySQL 8.0 [the default authentication method is `caching_sha2_password`](h
116116
```
117117
mysql -q -u root -h 127.0.0.1 --default-auth=mysql_native_password
118118
```
119+
120+
## Library format specification
121+
122+
By default the directories added to github should contain normal git repositories. If the format of the repositories is different you have two ways to specify it.
123+
124+
If all the directories are in the same format you can set it globally with these parameters:
125+
126+
* `--format`: it can be either `git` for filesystem repositories or `siva` for siva archives
127+
* `--bare`: specifies that git archives are bare, can only be used with `git` format
128+
* `--bucket`: sets the number of characters to use for bucketing, used with `siva` libraries
129+
* `--rooted`: enables or disables rooted reposotories management in `siva` libraries
130+
131+
If you are mixing formats you can specify each directory as a `file://` url with the same global parameters. For example:
132+
133+
```
134+
-d 'file:///path/to/git?format=git&bare=true' -d 'file:///path/to/sivas?format=siva&rooted=false&bucket=0'
135+
```

0 commit comments

Comments
 (0)