aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/cli/internal/scm/git_rust.go
diff options
context:
space:
mode:
author简律纯 <hsiangnianian@outlook.com>2023-04-28 01:36:55 +0800
committer简律纯 <hsiangnianian@outlook.com>2023-04-28 01:36:55 +0800
commitfc8c5fdce62fb229202659408798a7b6c98f6e8b (patch)
tree7554f80e50de4af6fd255afa7c21bcdd58a7af34 /cli/internal/scm/git_rust.go
parentdd84b9d64fb98746a230cd24233ff50a562c39c9 (diff)
downloadHydroRoll-fc8c5fdce62fb229202659408798a7b6c98f6e8b.tar.gz
HydroRoll-fc8c5fdce62fb229202659408798a7b6c98f6e8b.zip
Diffstat (limited to 'cli/internal/scm/git_rust.go')
-rw-r--r--cli/internal/scm/git_rust.go34
1 files changed, 0 insertions, 34 deletions
diff --git a/cli/internal/scm/git_rust.go b/cli/internal/scm/git_rust.go
deleted file mode 100644
index 4b4cd2d..0000000
--- a/cli/internal/scm/git_rust.go
+++ /dev/null
@@ -1,34 +0,0 @@
-// Package scm abstracts operations on various tools like git
-// Currently, only git is supported.
-//
-// Adapted from https://github.com/thought-machine/please/tree/master/src/scm
-// Copyright Thought Machine, Inc. or its affiliates. All Rights Reserved.
-// SPDX-License-Identifier: Apache-2.0
-//go:build rust
-// +build rust
-
-package scm
-
-import (
- "fmt"
- "github.com/vercel/turbo/cli/internal/ffi"
- "github.com/vercel/turbo/cli/internal/turbopath"
-)
-
-// git implements operations on a git repository.
-type git struct {
- repoRoot turbopath.AbsoluteSystemPath
-}
-
-// ChangedFiles returns a list of modified files since the given commit, optionally including untracked files.
-func (g *git) ChangedFiles(fromCommit string, toCommit string, monorepoRoot string) ([]string, error) {
- return ffi.ChangedFiles(g.repoRoot.ToString(), monorepoRoot, fromCommit, toCommit)
-}
-
-func (g *git) PreviousContent(fromCommit string, filePath string) ([]byte, error) {
- if fromCommit == "" {
- return nil, fmt.Errorf("Need commit sha to inspect file contents")
- }
-
- return ffi.PreviousContent(g.repoRoot.ToString(), fromCommit, filePath)
-}