Skip to content

Commit 444b188

Browse files
Merge pull request #1 from github/stolee/cli
README: initial CLI design
2 parents 479275e + 81810a0 commit 444b188

File tree

3 files changed

+81
-2
lines changed

3 files changed

+81
-2
lines changed

.vscode/settings.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"[markdown]": {
3+
"editor.detectIndentation": false,
4+
"editor.insertSpaces": false,
5+
"editor.tabSize": 4,
6+
"editor.wordWrap": "off",
7+
"files.trimTrailingWhitespace": true,
8+
},
9+
"files.associations": {
10+
"*.md": "markdown"
11+
}
12+
}

README.md

Lines changed: 57 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,57 @@
1-
# git-bundle-server
2-
Bundle Server for Git
1+
# `git-bundle-server`: Manage a self-hosted bundle server
2+
3+
By running this software, you can self-host a bundle server to work with Git's
4+
[bundle URI feature][bundle-uris].
5+
6+
[bundle-uris]: https://github.com/git/git/blob/next/Documentation/technical/bundle-uri.txt
7+
8+
## Bundle Management through CLI
9+
10+
The following command-line interface allows you to manage which repositories are
11+
being managed by the bundle server.
12+
13+
* `git-bundle-server init <url> [<route>]`: Initialize a repository by cloning a
14+
bare repo from `<url>`. If `<route>` is specified, then it is the bundle
15+
server route to find the data for this repository. Otherwise, the route is
16+
inferred from `<url>` by removing the domain name. For example,
17+
`https://github.com/git-for-windows/git` is assigned the route
18+
`/git-for-windows/git`. Run `git-bundle-server update` to initialize bundle
19+
information. Configure the web server to recognize this repository at that
20+
route. Configure scheduler to run `git-bundle-server update --all` as
21+
necessary.
22+
23+
* `git-bundle-server update [--daily|--hourly] <route>`: For the
24+
repository in the current directory (or the one specified by `<route>`), fetch
25+
the latest content from the remote and create a new set of bundles and update
26+
the bundle list. The `--daily` and `--hourly` options allow the scheduler to
27+
indicate the timing of this instance to indicate if the newest bundle should
28+
be an "hourly" or "daily" bundle. If `--daily` is specified, then collapse the
29+
existing hourly bundles into a daily bundle. If there are too many daily
30+
bundles, then collapse the appropriate number of oldest daily bundles into the
31+
base bundle.
32+
33+
* `git-bundle-server update-all [<options>]`: For every configured route, run
34+
`git-bundle-server update <options> <route>`. This is called by the scheduler.
35+
36+
* `git-bundle-server stop <route>`: Stop computing bundles or serving content
37+
for the repository at the specified `<route>`. The route remains configured in
38+
case it is reenabled in the future.
39+
40+
* `git-bundle-server start <route>`: Start computing bundles and serving content
41+
for the repository at the specified `<route>`. This does not update the
42+
content immediately, but adds it back to the scheduler.
43+
44+
* `git-bundle-server delete <route>`: Remove the configuration for the given
45+
`<route>` and delete its repository data.
46+
47+
## Web Server Management
48+
49+
Independent of the management of the individual repositories hosted by the
50+
server, you can manage the web server process itself using these commands:
51+
52+
* `git-bundle-server web-server start`: Start the web server process.
53+
54+
* `git-bundle-server web-server stop`: Stop the web server process.
55+
56+
Finally, if you want to run the web server process directly in your terminal,
57+
for debugging purposes, then you can run `git-bundle-web-server`.

Wishlist.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Feature Wishlist
2+
================
3+
4+
In the fullness of time, the bundle server should have the additional
5+
features:
6+
7+
* The root directory for storing the Git repositories could be specified
8+
by an environment variable.
9+
10+
* The web server should have logging options similar to Git's trace2.
11+
12+
* The web server should allow specifying an HTTPS certificate.

0 commit comments

Comments
 (0)