Dagger
Search

git

This module has been generated via dagger init and serves as a reference to
basic module structure as you get started with Dagger.

Two functions have been pre-created. You can modify, delete, or add to them,
as needed. They demonstrate usage of arguments and return types using simple
echo and grep commands. The functions can be called from the dagger CLI or
from one of the SDKs.

The first line in this comment block is a short description line and the
rest is a long description with more detail on the module's purpose or usage,
if appropriate. All modules should have a short description.

Installation

dagger install github.com/riftonix/daggerverse/git@v0.2.0

Entrypoint

Return Type
Git !
Arguments
NameTypeDefault ValueDescription
sourceDirectory -Git repository directory (must include .git)
imageRegistryString "docker.io"Git image registry
imageRepositoryString "alpine/git"Git image repositroy
imageTagString "2.52.0"Git image tag
containerUserString "65532"Git image user
Example
dagger -m github.com/riftonix/daggerverse/git@4e89f1f5067e7ef4d3758764622ab4d616f1e882 call \
func (m *MyModule) Example() *dagger.Git  {
	return dag.
			Git()
}
@function
def example() -> dagger.Git:
	return (
		dag.git()
	)
@func()
example(): Git {
	return dag
		.git()
}

Types

Git 🔗

container() 🔗

Creates container with configured git

Return Type
Container !
Example
dagger -m github.com/riftonix/daggerverse/git@4e89f1f5067e7ef4d3758764622ab4d616f1e882 call \
 container
func (m *MyModule) Example() *dagger.Container  {
	return dag.
			Git().
			Container()
}
@function
def example() -> dagger.Container:
	return (
		dag.git()
		.container()
	)
@func()
example(): Container {
	return dag
		.git()
		.container()
}

getChangedPaths() 🔗

Return changed paths inside diff_path between target_branch and HEAD

Return Type
[String ! ] !
Arguments
NameTypeDefault ValueDescription
targetBranchString !"master"Target branch or ref to diff against
diffPathString "."Path to scope the diff (relative to repo root)
Example
dagger -m github.com/riftonix/daggerverse/git@4e89f1f5067e7ef4d3758764622ab4d616f1e882 call \
 get-changed-paths --target-branch string
func (m *MyModule) Example(ctx context.Context, targetBranch string) []string  {
	return dag.
			Git().
			GetChangedPaths(ctx, targetBranch)
}
@function
async def example(target_branch: str) -> List[str]:
	return await (
		dag.git()
		.get_changed_paths(target_branch)
	)
@func()
async example(targetBranch: string): Promise<string[]> {
	return dag
		.git()
		.getChangedPaths(targetBranch)
}