This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a commit to branch gitignore
in repository https://gitbox.apache.org/repos/asf/skywalking-eyes.git

commit 35f35138fb33add2fd1686c33179e9750ee5323f
Author: kezhenxu94 <[email protected]>
AuthorDate: Wed Sep 8 14:00:15 2021 +0800

    Resolve absolute path in `.gitignore` to relative path
---
 .gitignore           | 4 ++--
 pkg/header/config.go | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index 8d0e816..98e02c3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,8 +16,8 @@
 # under the License.
 # 
 .idea/
-bin/
+/bin/
 assets/assets.gen.go
 .DS_Store
 coverage.txt
-plantuml.jar
\ No newline at end of file
+plantuml.jar
diff --git a/pkg/header/config.go b/pkg/header/config.go
index 900b726..6e5aeae 100644
--- a/pkg/header/config.go
+++ b/pkg/header/config.go
@@ -114,6 +114,7 @@ func (config *ConfigHeader) Finalize() error {
                        if strings.HasPrefix(line, "#") || 
strings.TrimSpace(line) == "" {
                                continue
                        }
+                       line = strings.TrimLeft(line, "/")
                        logger.Log.Debugln("Add ignore path from .gitignore:", 
line)
                        config.PathsIgnore = append(config.PathsIgnore, 
strings.TrimSpace(line))
                }

Reply via email to