dgit

command
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2023 License: ISC Imports: 12 Imported by: 0

Documentation

Overview

usage: dgit <command> [arguments]

Djmoch's Git Viewer

DGit is a template-driven alternative to CGit. It listens on a TCP port to allow viewing Git repositories from a web browser.

The commands are:

serve   serve Git repositories
env     print DGit environment information
version print version information

Use "dgit help <command>" for more information about a command.

Additional topics are:

environment environment variables

Use "dgit help <topic>" for more information about that topic.

Serve Git repositories

usage: dgit serve URL

Serve serves Git repositories

DGit listens and serves repositories on the provided URL. The only recognized scheme is http.

The DGit handler supports the "dumb" Git HTTP protocol, so read-only repository operations, such as cloning and fetching, are supported.

Print DGit environment information

usage: dgit env [-u] [-w] [var ...]

Env prints DGit environment information.

By default env prints information as a shell script. If one or more variable names is given as arguments, env prints the value of each named variable on its own line.

The -u flag requires one or more arguments and unsets the default setting for the named environment variables, if one has been set with 'go env -w'.

The -w flag requires one or more arguments of the form NAME=VALUE and changes the default settings of the named environment variables to the given values. If the same NAME is provided multiple times, the last one takes effect.

For more about environment variables, see 'dgit help environment'.

Print version information

usage: version

Version prints program version information.

Version information is compliant with version 2.0.0 of the semver spec. If the version includes a pre-release identifier, build metadata is also appended to the reported version.

Environment variables

The dgit command consults environment variables for configuration. If an environment variable is unset, the dgit command uses a sensible default setting. To see the effective setting of the variable <NAME>, run 'dgit env <NAME>'. To change the default setting, run 'dgit env -w <NAME>=<VALUE>'. Defaults changed using 'dgit env -w' are recorded in a DGit environment configuration file stored in /etc/dgit/config on Unix systems and C:\ProgramData\dgit\config on Windows. The location of the configuration file can be changed by setting the environment variable DGITENV, and 'dgit env DGITENV' prints the effective location, but 'dgit env -w' cannot change the default location. See 'dgit help env' for details.

Environment variables:

DGITENV
	The location of the DGit environment configuration file.
	Cannot be set using 'dgit env -w'.
DGIT_REPO_BASE
	The path to the directory containing repositories for
	DGit to serve. Repository URL's are converted into
	absolute paths on the local filesytem by appending the
	URL path to DGIT_REPO_BASE.
DGIT_PROJ_LIST_PATH
	The path to the file containing a list of repositories
	to serve, identified by their URL path. If this file
	exists, it serves as a whitelist, and repositories
	under DGIT_REPO_BASE not in the list are treated as if
	they did not exist.
DGIT_REMOVE_SUFFIX
	When this is true, a .git suffix will be removed from
	the repo basename if it exists. Setting this true will
	also remove a trailing .git directory from the URL if
	it exists in the path.

Directories

Path Synopsis
internal
base
Package base defines the foundational structures required to build out the dgit command suite.
Package base defines the foundational structures required to build out the dgit command suite.
env
Package env implements the "dgit env" command
Package env implements the "dgit env" command
help
Package help implements the "dgit help" command
Package help implements the "dgit help" command
serve
Package serve implements the "dgit serve" command
Package serve implements the "dgit serve" command
version
Package version implements the "dgit version" command
Package version implements the "dgit version" command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL