Try to turn a remote URL into a URL that can be used to, e.g.,
make GitHub API requests. That is, do not accept SSH URLs and
drop an ending .git
.
Equations
- Lake.Git.filterUrl? url = if String.startsWith url "git" = true then none else if String.endsWith url ".git" = true then some (String.dropRight url 4) else some url
Instances For
Equations
- Lake.Git.isFullObjectName rev = (String.length rev == 40 && String.all rev fun (c : Char) => Char.isDigit c || decide (Char.ofNat 97 ≤ c) && decide (c ≤ Char.ofNat 102))
Instances For
Equations
- Lake.instToStringGitRepo = { toString := fun (x : Lake.GitRepo) => x.dir.toString }
Equations
- Lake.GitRepo.cwd = { dir := { toString := "." } }
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[inline]
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[inline]
Equations
- Lake.GitRepo.quietInit repo = Lake.GitRepo.execGit #["init", "-q"] repo
Instances For
@[inline]
Equations
- Lake.GitRepo.fetch repo remote = Lake.GitRepo.execGit #["fetch", remote] repo
Instances For
@[inline]
Equations
- Lake.GitRepo.checkoutBranch branch repo = Lake.GitRepo.execGit #["checkout", "-B", branch] repo
Instances For
@[inline]
Equations
- Lake.GitRepo.checkoutDetach hash repo = Lake.GitRepo.execGit #["checkout", "--detach", hash] repo
Instances For
@[inline]
Equations
- Lake.GitRepo.resolveRevision? rev repo = Lake.GitRepo.captureGit? #["rev-parse", "--verify", rev] repo
Instances For
@[inline]
Equations
- Lake.GitRepo.resolveRevision rev repo = Lake.GitRepo.captureGit #["rev-parse", "--verify", rev] repo
Instances For
@[inline]
Equations
- Lake.GitRepo.getHeadRevision repo = Lake.GitRepo.resolveRevision "HEAD" repo
Instances For
@[inline]
Equations
- Lake.GitRepo.getHeadRevision? repo = Lake.GitRepo.resolveRevision? "HEAD" repo
Instances For
def
Lake.GitRepo.resolveRemoteRevision
(rev : String)
(remote : optParam String Lake.Git.defaultRemote)
(repo : Lake.GitRepo)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lake.GitRepo.findRemoteRevision
(repo : Lake.GitRepo)
(rev? : optParam (Option String) none)
(remote : optParam String Lake.Git.defaultRemote)
:
Equations
- Lake.GitRepo.findRemoteRevision repo rev? remote = do Lake.GitRepo.fetch repo remote Lake.GitRepo.resolveRemoteRevision (Option.getD rev? Lake.Git.upstreamBranch) remote repo
Instances For
@[inline]
Equations
- Lake.GitRepo.branchExists rev repo = Lake.GitRepo.testGit #["show-ref", "--verify", toString "refs/heads/" ++ toString rev ++ toString ""] repo
Instances For
@[inline]
Equations
- Lake.GitRepo.revisionExists rev repo = Lake.GitRepo.testGit #["rev-parse", "--verify", rev ++ "^{commit}"] repo
Instances For
@[inline]
Equations
- Lake.GitRepo.findTag? rev repo = Lake.GitRepo.captureGit? #["describe", "--tags", "--exact-match", rev] repo
Instances For
@[inline]
def
Lake.GitRepo.getRemoteUrl?
(remote : optParam String Lake.Git.defaultRemote)
(repo : Lake.GitRepo)
:
Equations
- Lake.GitRepo.getRemoteUrl? remote repo = Lake.GitRepo.captureGit? #["remote", "get-url", remote] repo
Instances For
def
Lake.GitRepo.getFilteredRemoteUrl?
(remote : optParam String Lake.Git.defaultRemote)
(repo : Lake.GitRepo)
:
Equations
- Lake.GitRepo.getFilteredRemoteUrl? remote repo = OptionT.run do let __do_lift ← Lake.GitRepo.getRemoteUrl? remote repo liftM (Lake.Git.filterUrl? __do_lift)
Instances For
@[inline]
Equations
- Lake.GitRepo.hasNoDiff repo = Lake.GitRepo.testGit #["diff", "--exit-code"] repo