Documentation

Lake.Util.Git

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.

Instances For
    @[deprecated Lake.GitRev.isFullSha1 (since := "2026-04-17")]
    Instances For
      structure Lake.GitRepo :
      Instances For
        @[reducible, inline]

        A commit-ish Git revision.

        This can be SHA1 commit hash, a branch name, or one of Git's more complex specifiers.

        Instances For

          The head revision (i.e., HEAD).

          Instances For

            The revision fetched during the last git fetch (i.e., FETCH_HEAD).

            Instances For

              Returns whether this revision is a 40-digit hexadecimal (SHA1) commit hash.

              Instances For
                @[inline]
                def Lake.GitRev.withRemote (remote : String) (rev : GitRev) :

                Scopes the revision by the remote.

                Instances For
                  @[instance_reducible]
                  @[inline]
                  Instances For
                    @[inline]

                    Returns whether .git exists at the root of the repository directory.

                    Instances For
                      @[inline]
                      Instances For
                        @[inline]
                        Instances For
                          @[inline]
                          Instances For
                            @[inline]
                            Instances For
                              Instances For
                                Instances For
                                  Instances For
                                    Instances For
                                      Instances For
                                        Instances For
                                          Instances For

                                            Remove untracked files from tracked folders in the repository.

                                            Instances For

                                              Resolves the revision to a Git object name (SHA1 hash) which or may not exist in the repository.

                                              Instances For

                                                Resolves the revision to a valid commit hash within the repository.

                                                Instances For
                                                  Instances For
                                                    @[inline]
                                                    Instances For
                                                      Instances For
                                                        Instances For
                                                          Instances For
                                                            Instances For
                                                              Instances For
                                                                Instances For
                                                                  def Lake.GitRepo.addRemote (remote url : String) (repo : GitRepo) :
                                                                  Instances For
                                                                    def Lake.GitRepo.setRemoteUrl (remote url : String) (repo : GitRepo) :
                                                                    Instances For
                                                                      Instances For
                                                                        Instances For
                                                                          @[inline]
                                                                          Instances For