Module vgit stdlib

vgit
Version:
0.3.3
License:
MIT
Dependencies from vmod:
0
Imports:
3
Imported by:
0
Repository:
OS-specific
Show selected OS-specific symbols.
Backend-specific
Show selected Backend-specific symbols.

Dependencies defined in v.mod

This section is empty.

Imports

Imported by

This section is empty.

Aliases

This section is empty.

Constants

This section is empty.

Sum types

This section is empty.

Functions

#fn add_common_tool_options

fn add_common_tool_options(mut context &VGitOptions, mut fp &flag.FlagParser) []string

#fn check_v_commit_timestamp_before_self_rebuilding

fn check_v_commit_timestamp_before_self_rebuilding(v_timestamp int)

#fn clone_or_pull

fn clone_or_pull(remote_git_url string, local_worktree_path string)

#fn line_to_timestamp_and_commit

fn line_to_timestamp_and_commit(line string) (int, string)

#fn normalized_workpath_for_commit

fn normalized_workpath_for_commit(workdir string, commit string) string

#fn prepare_vc_source

fn prepare_vc_source(vcdir string, cdir string, commit string) (string, string)

#fn validate_commit_exists

fn validate_commit_exists(commit string)

Structs

#struct VGitContext

pub struct VGitContext {
pub:
	cc          string = 'cc' // what compiler to use
	workdir     string = '/tmp' // the base working folder
	commit_v    string = 'master' // the commit-ish that needs to be prepared
	path_v      string // where is the local working copy v repo
	path_vc     string // where is the local working copy vc repo
	v_repo_url  string // the remote v repo URL
	vc_repo_url string // the remote vc repo URL
pub mut:
	// these will be filled by vgitcontext.compile_oldv_if_needed()
	commit_v__hash string // the git commit of the v repo that should be prepared
	commit_vc_hash string // the git commit of the vc repo, corresponding to commit_v__hash
	vexename       string // v or v.exe
	vexepath       string // the full absolute path to the prepared v/v.exe
	vvlocation     string // v.v or compiler/ or cmd/v, depending on v version
	make_fresh_tcc bool   // whether to do 'make fresh_tcc' before compiling an old V.
}

#fn (&VGitContext) compile_oldv_if_needed

fn (mut vgit_context &VGitContext) compile_oldv_if_needed()

#struct VGitOptions

pub struct VGitOptions {
pub mut:
	workdir     string // the working folder (typically /tmp), where the tool will write
	v_repo_url  string // the url of the V repository. It can be a local folder path, if you want to eliminate network operations...
	vc_repo_url string // the url of the vc repository. It can be a local folder path, if you want to eliminate network operations...
	show_help   bool   // whether to show the usage screen
	verbose     bool   // should the tool be much more verbose
}

Interfaces

This section is empty.

Enums

This section is empty.