We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent daa4f1f commit 23a6abdCopy full SHA for 23a6abd
utils.go
@@ -217,7 +217,12 @@ func IsFont(path string) bool {
217
218
// check for the `.git` folder
219
func IsGitFolder(path string) bool {
220
- if strings.HasSuffix(path, string(os.PathSeparator)+".git") {
+ // checks for the ".git" folder itself, i.e. for a path that ends with `/.git`
221
+ // ... or for files within the ".git" folder, i.e. for a path that contains `/.git/`
222
+ gitFolderPath := string(os.PathSeparator) + ".git"
223
+ fileInGitFolderPath := gitFolderPath + string(os.PathSeparator)
224
+
225
+ if strings.HasSuffix(path, gitFolderPath) || strings.Contains(path, fileInGitFolderPath) {
226
if !didPrintGitFolderMsg {
227
log.Info("\tIgnoring `.git`")
228
didPrintGitFolderMsg = true
0 commit comments