File tree Expand file tree Collapse file tree 1 file changed +0
-7
lines changed
Expand file tree Collapse file tree 1 file changed +0
-7
lines changed Original file line number Diff line number Diff 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.
2121type 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
211207func 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 ,
You can’t perform that action at this time.
0 commit comments