Skip to content

Commit e57cbf1

Browse files
authored
Remove unused field: Repository.real (#1936)
1 parent fae1b67 commit e57cbf1

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

libs/git/repository.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ var GitDirectoryName = ".git"
1919
// Repository represents a Git repository or a directory
2020
// that could later be initialized as Git repository.
2121
type Repository struct {
22-
// real indicates if this is a real repository or a non-Git
23-
// directory where we process .gitignore files.
24-
real bool
25-
2622
// rootDir is the path to the root of the repository checkout.
2723
// This can be either the main repository checkout or a worktree checkout.
2824
// For more information about worktrees, see: https://git-scm.com/docs/git-worktree#_description.
@@ -209,15 +205,13 @@ func (r *Repository) Ignore(relPath string) (bool, error) {
209205
}
210206

211207
func NewRepository(path vfs.Path) (*Repository, error) {
212-
real := true
213208
rootDir, err := vfs.FindLeafInTree(path, GitDirectoryName)
214209
if err != nil {
215210
if !errors.Is(err, fs.ErrNotExist) {
216211
return nil, err
217212
}
218213
// Cannot find `.git` directory.
219214
// Treat the specified path as a potential repository root checkout.
220-
real = false
221215
rootDir = path
222216
}
223217

@@ -229,7 +223,6 @@ func NewRepository(path vfs.Path) (*Repository, error) {
229223
}
230224

231225
repo := &Repository{
232-
real: real,
233226
rootDir: rootDir,
234227
gitDir: gitDir,
235228
gitCommonDir: gitCommonDir,

0 commit comments

Comments
 (0)