Handbook
Glossary
ensure-git-remote ( owner repo -- )
Vocabulary
git
Inputs
owner
an
object
repo
an
object
Outputs
None
Definition
USING:
arrays
formatting
hashtables
kernel
sequences
;
IN:
git
:
ensure-git-remote
( owner repo -- )
[
parse-git-config
]
2dip
3dup
has-remote-repo?
[
3drop
]
[
[
pick
has-any-git-at-urls?
[
[
"git@github.com:%s/%s"
sprintf
]
[
drop
"+refs/heads/*:refs/remotes/%s/*"
sprintf
]
2bi
[
[
~quotation~
]
dip
[
]
curry
compose
{
}
like
]
dip
[
[
"fetch"
]
]
dip
[
]
curry
compose
{
}
like
[
]
2curry
{
}
like
>hashtable
]
[
[
"https://github.com/%s/%s"
sprintf
]
[
drop
"+refs/heads/*:refs/remotes/%s/*"
sprintf
]
2bi
[
[
~quotation~
]
dip
[
]
curry
compose
{
}
like
]
dip
[
[
"fetch"
]
]
dip
[
]
curry
compose
{
}
like
[
]
2curry
{
}
like
>hashtable
]
if
]
2keep
"_"
glue
"\""
dup
surround
"remote "
prepend
swap
2array
suffix
write-git-config
]
if
;