git
Git as a Dagger Module
Installation
dagger install github.com/shykes/git@v0.2.0
Entrypoint
Return Type
Git
func (m *myModule) example() *Git {
return dag.
Git()
}
@function
def example() -> dag.Git:
return (
dag.git()
)
@func()
example(): Git {
return dag
.git()
}
Types
Git
load()
Load the contents of a git repository
Return Type
Repo !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | The source directory to load. It must contain a `.git` directory, or be one. |
worktree | Directory | - | A separate worktree, if needed. |
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
load --source DIR_PATH \
directory
func (m *myModule) example(source *Directory) *GitRepo {
return dag.
Git().
Load(source)
}
@function
def example(source: dagger.Directory) -> dag.GitRepo:
return (
dag.git()
.load(source)
)
@func()
example(source: Directory): GitRepo {
return dag
.git()
.load(source)
}
init()
Initialize a git repository
Return Type
Repo !
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
init \
directory
func (m *myModule) example() *GitRepo {
return dag.
Git().
Init()
}
@function
def example() -> dag.GitRepo:
return (
dag.git()
.init()
)
@func()
example(): GitRepo {
return dag
.git()
.init()
}
clone()
Clone a remote git repository
Return Type
Repo !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
url | String ! | - | No description provided |
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
clone --url string \
directory
func (m *myModule) example(url string) *GitRepo {
return dag.
Git().
Clone(url)
}
@function
def example(url: str) -> dag.GitRepo:
return (
dag.git()
.clone(url)
)
@func()
example(url: string): GitRepo {
return dag
.git()
.clone(url)
}
remote()
Initialize a reference to a git remote
Return Type
Remote !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
url | String ! | - | No description provided |
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
remote --url string \
tag --name string \
commit \
tree
func (m *myModule) example(url string) *GitRemote {
return dag.
Git().
Remote(url)
}
@function
def example(url: str) -> dag.GitRemote:
return (
dag.git()
.remote(url)
)
@func()
example(url: string): GitRemote {
return dag
.git()
.remote(url)
}
Repo
A git repository
state()
Return Type
Directory !
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
clone --url string \
state
func (m *myModule) example(url string) *Directory {
return dag.
Git().
Clone(url).
State()
}
@function
def example(url: str) -> dagger.Directory:
return (
dag.git()
.clone(url)
.state()
)
@func()
example(url: string): Directory {
return dag
.git()
.clone(url)
.state()
}
worktree()
Return Type
Directory !
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
clone --url string \
worktree
func (m *myModule) example(url string) *Directory {
return dag.
Git().
Clone(url).
Worktree()
}
@function
def example(url: str) -> dagger.Directory:
return (
dag.git()
.clone(url)
.worktree()
)
@func()
example(url: string): Directory {
return dag
.git()
.clone(url)
.worktree()
}
inspect()
Open an interactive terminal, with the repository available for inspection
Return Type
Terminal !
Function GitRepo.inspect is not accessible from the git module
func (m *myModule) example(url string) *Terminal {
return dag.
Git().
Clone(url).
Inspect()
}
@function
def example(url: str) -> dag.Terminal:
return (
dag.git()
.clone(url)
.inspect()
)
@func()
example(url: string): Terminal {
return dag
.git()
.clone(url)
.inspect()
}
directory()
Combine the repository’s worktree and state into a single directory.
The state is copied to `.git`
Return Type
Directory !
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
clone --url string \
directory
func (m *myModule) example(url string) *Directory {
return dag.
Git().
Clone(url).
Directory()
}
@function
def example(url: str) -> dagger.Directory:
return (
dag.git()
.clone(url)
.directory()
)
@func()
example(url: string): Directory {
return dag
.git()
.clone(url)
.directory()
}
checkout()
Checkout the given ref into the worktree
Return Type
Repo !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
ref | String ! | - | The git ref to checkout |
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
clone --url string \
checkout --ref string \
directory
func (m *myModule) example(url string, ref string) *GitRepo {
return dag.
Git().
Clone(url).
Checkout(ref)
}
@function
def example(url: str, ref: str) -> dag.GitRepo:
return (
dag.git()
.clone(url)
.checkout(ref)
)
@func()
example(url: string, ref: string): GitRepo {
return dag
.git()
.clone(url)
.checkout(ref)
}
with()
Change properties of the repository
Return Type
Repo !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
state | Directory | - | Set the git state directory |
worktree | Directory | - | Set the git worktree |
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
clone --url string \
with \
directory
func (m *myModule) example(url string) *GitRepo {
return dag.
Git().
Clone(url).
With()
}
@function
def example(url: str) -> dag.GitRepo:
return (
dag.git()
.clone(url)
.with_()
)
@func()
example(url: string): GitRepo {
return dag
.git()
.clone(url)
.with()
}
filterSubdirectory()
Filter the contents of the repository
Return Type
Repo !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
path | String ! | - | No description provided |
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
clone --url string \
filter-subdirectory --path string \
directory
func (m *myModule) example(url string, path string) *GitRepo {
return dag.
Git().
Clone(url).
FilterSubdirectory(path)
}
@function
def example(url: str, path: str) -> dag.GitRepo:
return (
dag.git()
.clone(url)
.filter_subdirectory(path)
)
@func()
example(url: string, path: string): GitRepo {
return dag
.git()
.clone(url)
.filterSubdirectory(path)
}
withCommand()
Execute a git command in the repository
Return Type
Repo !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
args | [String ! ] ! | - | No description provided |
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
clone --url string \
with-command --args string1 --args string2 \
directory
func (m *myModule) example(url string, args []string) *GitRepo {
return dag.
Git().
Clone(url).
WithCommand(args)
}
@function
def example(url: str, args: List[str]) -> dag.GitRepo:
return (
dag.git()
.clone(url)
.with_command(args)
)
@func()
example(url: string, args: string[]): GitRepo {
return dag
.git()
.clone(url)
.withCommand(args)
}
command()
A Git command executed from the current repository state
Return Type
Command !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
args | [String ! ] ! | - | No description provided |
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
clone --url string \
command --args string1 --args string2 \
stdout
func (m *myModule) example(url string, args []string) *GitCommand {
return dag.
Git().
Clone(url).
Command(args)
}
@function
def example(url: str, args: List[str]) -> dag.GitCommand:
return (
dag.git()
.clone(url)
.command(args)
)
@func()
example(url: string, args: string[]): GitCommand {
return dag
.git()
.clone(url)
.command(args)
}
withRemote()
Return Type
Repo !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
name | String ! | - | No description provided |
url | String ! | - | No description provided |
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
clone --url string \
with-remote --name string --url string \
directory
func (m *myModule) example(url string, name string, url1 string) *GitRepo {
return dag.
Git().
Clone(url).
WithRemote(name, url1)
}
@function
def example(url: str, name: str, url1: str) -> dag.GitRepo:
return (
dag.git()
.clone(url)
.with_remote(name, url1)
)
@func()
example(url: string, name: string, url1: string): GitRepo {
return dag
.git()
.clone(url)
.withRemote(name, url1)
}
tag()
Return Type
Tag !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
name | String ! | - | No description provided |
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
clone --url string \
tag --name string \
full-name
func (m *myModule) example(url string, name string) *GitTag {
return dag.
Git().
Clone(url).
Tag(name)
}
@function
def example(url: str, name: str) -> dag.GitTag:
return (
dag.git()
.clone(url)
.tag(name)
)
@func()
example(url: string, name: string): GitTag {
return dag
.git()
.clone(url)
.tag(name)
}
commit()
Return Type
Commit !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
digest | String ! | - | No description provided |
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
clone --url string \
commit --digest string \
tree
func (m *myModule) example(url string, digest string) *GitCommit {
return dag.
Git().
Clone(url).
Commit(digest)
}
@function
def example(url: str, digest: str) -> dag.GitCommit:
return (
dag.git()
.clone(url)
.commit(digest)
)
@func()
example(url: string, digest: string): GitCommit {
return dag
.git()
.clone(url)
.commit(digest)
}
Remote
A git remote
url()
Return Type
String !
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
remote --url string \
url
func (m *myModule) example(ctx context.Context, url string) string {
return dag.
Git().
Remote(url).
Url(ctx)
}
@function
async def example(url: str) -> str:
return await (
dag.git()
.remote(url)
.url()
)
@func()
async example(url: string): Promise<string> {
return dag
.git()
.remote(url)
.url()
}
tag()
Lookup a tag in the remote
Return Type
RemoteTag !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
name | String ! | - | No description provided |
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
remote --url string \
tag --name string \
commit \
tree
func (m *myModule) example(url string, name string) *GitRemoteTag {
return dag.
Git().
Remote(url).
Tag(name)
}
@function
def example(url: str, name: str) -> dag.GitRemoteTag:
return (
dag.git()
.remote(url)
.tag(name)
)
@func()
example(url: string, name: string): GitRemoteTag {
return dag
.git()
.remote(url)
.tag(name)
}
tags()
Query the remote for its tags.
If `filter` is set, only tag matching that regular expression will be included.
Return Type
[RemoteTag ! ] !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
filter | String | - | A regular expression to filter tag names. Only matching tag names will be included. |
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
remote --url string \
tags \
commit \
tree
func (m *myModule) example(url string) []*GitRemoteTag {
return dag.
Git().
Remote(url).
Tags()
}
@function
def example(url: str) -> List[dag.GitRemoteTag]:
return (
dag.git()
.remote(url)
.tags()
)
@func()
example(url: string): GitRemoteTag[] {
return dag
.git()
.remote(url)
.tags()
}
branch()
Lookup a branch in the remote
Return Type
RemoteBranch !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
name | String ! | - | No description provided |
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
remote --url string \
branch --name string \
commit \
tree
func (m *myModule) example(url string, name string) *GitRemoteBranch {
return dag.
Git().
Remote(url).
Branch(name)
}
@function
def example(url: str, name: str) -> dag.GitRemoteBranch:
return (
dag.git()
.remote(url)
.branch(name)
)
@func()
example(url: string, name: string): GitRemoteBranch {
return dag
.git()
.remote(url)
.branch(name)
}
branches()
List available branches in the remote
Return Type
[RemoteBranch ! ] !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
filter | String | - | A regular expression to filter branch names. Only matching names are included. |
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
remote --url string \
branches \
commit \
tree
func (m *myModule) example(url string) []*GitRemoteBranch {
return dag.
Git().
Remote(url).
Branches()
}
@function
def example(url: str) -> List[dag.GitRemoteBranch]:
return (
dag.git()
.remote(url)
.branches()
)
@func()
example(url: string): GitRemoteBranch[] {
return dag
.git()
.remote(url)
.branches()
}
Command
A Git command
args()
Return Type
[String ! ] !
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
clone --url string \
command --args string1 --args string2 \
args
func (m *myModule) example(ctx context.Context, url string, args []string) []string {
return dag.
Git().
Clone(url).
Command(args).
Args(ctx)
}
@function
async def example(url: str, args: List[str]) -> List[str]:
return await (
dag.git()
.clone(url)
.command(args)
.args()
)
@func()
async example(url: string, args: string[]): Promise<string[]> {
return dag
.git()
.clone(url)
.command(args)
.args()
}
input()
Return Type
Repo !
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
clone --url string \
command --args string1 --args string2 \
input \
directory
func (m *myModule) example(url string, args []string) *GitRepo {
return dag.
Git().
Clone(url).
Command(args).
Input()
}
@function
def example(url: str, args: List[str]) -> dag.GitRepo:
return (
dag.git()
.clone(url)
.command(args)
.input()
)
@func()
example(url: string, args: string[]): GitRepo {
return dag
.git()
.clone(url)
.command(args)
.input()
}
debug()
Return Type
Terminal !
Function GitCommand.debug is not accessible from the git module
func (m *myModule) example(url string, args []string) *Terminal {
return dag.
Git().
Clone(url).
Command(args).
Debug()
}
@function
def example(url: str, args: List[str]) -> dag.Terminal:
return (
dag.git()
.clone(url)
.command(args)
.debug()
)
@func()
example(url: string, args: string[]): Terminal {
return dag
.git()
.clone(url)
.command(args)
.debug()
}
stdout()
Return Type
String !
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
clone --url string \
command --args string1 --args string2 \
stdout
func (m *myModule) example(ctx context.Context, url string, args []string) string {
return dag.
Git().
Clone(url).
Command(args).
Stdout(ctx)
}
@function
async def example(url: str, args: List[str]) -> str:
return await (
dag.git()
.clone(url)
.command(args)
.stdout()
)
@func()
async example(url: string, args: string[]): Promise<string> {
return dag
.git()
.clone(url)
.command(args)
.stdout()
}
stderr()
Return Type
String !
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
clone --url string \
command --args string1 --args string2 \
stderr
func (m *myModule) example(ctx context.Context, url string, args []string) string {
return dag.
Git().
Clone(url).
Command(args).
Stderr(ctx)
}
@function
async def example(url: str, args: List[str]) -> str:
return await (
dag.git()
.clone(url)
.command(args)
.stderr()
)
@func()
async example(url: string, args: string[]): Promise<string> {
return dag
.git()
.clone(url)
.command(args)
.stderr()
}
sync()
Return Type
Command !
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
clone --url string \
command --args string1 --args string2 \
sync \
stdout
func (m *myModule) example(url string, args []string) *GitCommand {
return dag.
Git().
Clone(url).
Command(args).
Sync()
}
@function
def example(url: str, args: List[str]) -> dag.GitCommand:
return (
dag.git()
.clone(url)
.command(args)
.sync()
)
@func()
example(url: string, args: string[]): GitCommand {
return dag
.git()
.clone(url)
.command(args)
.sync()
}
output()
Return Type
Repo !
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
clone --url string \
command --args string1 --args string2 \
output \
directory
func (m *myModule) example(url string, args []string) *GitRepo {
return dag.
Git().
Clone(url).
Command(args).
Output()
}
@function
def example(url: str, args: List[str]) -> dag.GitRepo:
return (
dag.git()
.clone(url)
.command(args)
.output()
)
@func()
example(url: string, args: string[]): GitRepo {
return dag
.git()
.clone(url)
.command(args)
.output()
}
Tag
repository()
Return Type
Repo !
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
clone --url string \
tag --name string \
repository \
directory
func (m *myModule) example(url string, name string) *GitRepo {
return dag.
Git().
Clone(url).
Tag(name).
Repository()
}
@function
def example(url: str, name: str) -> dag.GitRepo:
return (
dag.git()
.clone(url)
.tag(name)
.repository()
)
@func()
example(url: string, name: string): GitRepo {
return dag
.git()
.clone(url)
.tag(name)
.repository()
}
name()
Return Type
String !
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
clone --url string \
tag --name string \
name
func (m *myModule) example(ctx context.Context, url string, name string) string {
return dag.
Git().
Clone(url).
Tag(name).
Name(ctx)
}
@function
async def example(url: str, name: str) -> str:
return await (
dag.git()
.clone(url)
.tag(name)
.name()
)
@func()
async example(url: string, name: string): Promise<string> {
return dag
.git()
.clone(url)
.tag(name)
.name()
}
fullName()
Return Type
String !
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
clone --url string \
tag --name string \
full-name
func (m *myModule) example(ctx context.Context, url string, name string) string {
return dag.
Git().
Clone(url).
Tag(name).
FullName(ctx)
}
@function
async def example(url: str, name: str) -> str:
return await (
dag.git()
.clone(url)
.tag(name)
.full_name()
)
@func()
async example(url: string, name: string): Promise<string> {
return dag
.git()
.clone(url)
.tag(name)
.fullName()
}
tree()
Return Type
Directory !
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
clone --url string \
tag --name string \
tree
func (m *myModule) example(url string, name string) *Directory {
return dag.
Git().
Clone(url).
Tag(name).
Tree()
}
@function
def example(url: str, name: str) -> dagger.Directory:
return (
dag.git()
.clone(url)
.tag(name)
.tree()
)
@func()
example(url: string, name: string): Directory {
return dag
.git()
.clone(url)
.tag(name)
.tree()
}
Commit
digest()
Return Type
String !
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
remote --url string \
branch --name string \
commit \
digest
func (m *myModule) example(ctx context.Context, url string, name string) string {
return dag.
Git().
Remote(url).
Branch(name).
Commit().
Digest(ctx)
}
@function
async def example(url: str, name: str) -> str:
return await (
dag.git()
.remote(url)
.branch(name)
.commit()
.digest()
)
@func()
async example(url: string, name: string): Promise<string> {
return dag
.git()
.remote(url)
.branch(name)
.commit()
.digest()
}
repository()
Return Type
Repo !
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
remote --url string \
branch --name string \
commit \
repository \
directory
func (m *myModule) example(url string, name string) *GitRepo {
return dag.
Git().
Remote(url).
Branch(name).
Commit().
Repository()
}
@function
def example(url: str, name: str) -> dag.GitRepo:
return (
dag.git()
.remote(url)
.branch(name)
.commit()
.repository()
)
@func()
example(url: string, name: string): GitRepo {
return dag
.git()
.remote(url)
.branch(name)
.commit()
.repository()
}
tree()
Return Type
Directory !
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
remote --url string \
branch --name string \
commit \
tree
func (m *myModule) example(url string, name string) *Directory {
return dag.
Git().
Remote(url).
Branch(name).
Commit().
Tree()
}
@function
def example(url: str, name: str) -> dagger.Directory:
return (
dag.git()
.remote(url)
.branch(name)
.commit()
.tree()
)
@func()
example(url: string, name: string): Directory {
return dag
.git()
.remote(url)
.branch(name)
.commit()
.tree()
}
RemoteTag
A git tag
name()
Return Type
String !
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
remote --url string \
tag --name string \
name
func (m *myModule) example(ctx context.Context, url string, name string) string {
return dag.
Git().
Remote(url).
Tag(name).
Name(ctx)
}
@function
async def example(url: str, name: str) -> str:
return await (
dag.git()
.remote(url)
.tag(name)
.name()
)
@func()
async example(url: string, name: string): Promise<string> {
return dag
.git()
.remote(url)
.tag(name)
.name()
}
commitId()
Return Type
String !
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
remote --url string \
tag --name string \
commit-id
func (m *myModule) example(ctx context.Context, url string, name string) string {
return dag.
Git().
Remote(url).
Tag(name).
CommitId(ctx)
}
@function
async def example(url: str, name: str) -> str:
return await (
dag.git()
.remote(url)
.tag(name)
.commit_id()
)
@func()
async example(url: string, name: string): Promise<string> {
return dag
.git()
.remote(url)
.tag(name)
.commitId()
}
url()
Return Type
String !
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
remote --url string \
tag --name string \
url
func (m *myModule) example(ctx context.Context, url string, name string) string {
return dag.
Git().
Remote(url).
Tag(name).
Url(ctx)
}
@function
async def example(url: str, name: str) -> str:
return await (
dag.git()
.remote(url)
.tag(name)
.url()
)
@func()
async example(url: string, name: string): Promise<string> {
return dag
.git()
.remote(url)
.tag(name)
.url()
}
commit()
Return the commit referenced by the remote tag
Return Type
Commit !
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
remote --url string \
tag --name string \
commit \
tree
func (m *myModule) example(url string, name string) *GitCommit {
return dag.
Git().
Remote(url).
Tag(name).
Commit()
}
@function
def example(url: str, name: str) -> dag.GitCommit:
return (
dag.git()
.remote(url)
.tag(name)
.commit()
)
@func()
example(url: string, name: string): GitCommit {
return dag
.git()
.remote(url)
.tag(name)
.commit()
}
RemoteBranch
A git branch
name()
Return Type
String !
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
remote --url string \
branch --name string \
name
func (m *myModule) example(ctx context.Context, url string, name string) string {
return dag.
Git().
Remote(url).
Branch(name).
Name(ctx)
}
@function
async def example(url: str, name: str) -> str:
return await (
dag.git()
.remote(url)
.branch(name)
.name()
)
@func()
async example(url: string, name: string): Promise<string> {
return dag
.git()
.remote(url)
.branch(name)
.name()
}
commitId()
Return Type
String !
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
remote --url string \
branch --name string \
commit-id
func (m *myModule) example(ctx context.Context, url string, name string) string {
return dag.
Git().
Remote(url).
Branch(name).
CommitId(ctx)
}
@function
async def example(url: str, name: str) -> str:
return await (
dag.git()
.remote(url)
.branch(name)
.commit_id()
)
@func()
async example(url: string, name: string): Promise<string> {
return dag
.git()
.remote(url)
.branch(name)
.commitId()
}
url()
Return Type
String !
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
remote --url string \
branch --name string \
url
func (m *myModule) example(ctx context.Context, url string, name string) string {
return dag.
Git().
Remote(url).
Branch(name).
Url(ctx)
}
@function
async def example(url: str, name: str) -> str:
return await (
dag.git()
.remote(url)
.branch(name)
.url()
)
@func()
async example(url: string, name: string): Promise<string> {
return dag
.git()
.remote(url)
.branch(name)
.url()
}
commit()
Return the commit referenced by the remote branch
Return Type
Commit !
dagger -m github.com/shykes/git@2d0fc9687fdd48519352bc54418292864389e7d7 call \
remote --url string \
branch --name string \
commit \
tree
func (m *myModule) example(url string, name string) *GitCommit {
return dag.
Git().
Remote(url).
Branch(name).
Commit()
}
@function
def example(url: str, name: str) -> dag.GitCommit:
return (
dag.git()
.remote(url)
.branch(name)
.commit()
)
@func()
example(url: string, name: string): GitCommit {
return dag
.git()
.remote(url)
.branch(name)
.commit()
}