-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added condition to skip lines starting with exclamation #2751
Conversation
Signed-off-by: Teresa Romero <teresa@okteto.com>
@@ -80,6 +80,9 @@ func addStignoreSecrets(dev *model.Dev) error { | |||
if strings.HasPrefix(line, "#") { | |||
continue | |||
} | |||
if strings.HasPrefix(line, "!") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add tests for this function?
Codecov Report
@@ Coverage Diff @@
## master #2751 +/- ##
==========================================
+ Coverage 31.84% 32.03% +0.19%
==========================================
Files 158 158
Lines 18553 18555 +2
==========================================
+ Hits 5908 5945 +37
+ Misses 11945 11905 -40
- Partials 700 705 +5
Continue to review full report at Codecov.
|
What about lines starting with |
Using the repo of agusting, i was including .numbers and also in my local a .gitignore, and it was working on my remote dev, the ignored rules where working even though the .stignore did not reflect the #include lines |
Signed-off-by: Teresa Romero <teresa@okteto.com>
Signed-off-by: Teresa Romero <teresa@okteto.com>
since this change, the following local .stignore file doesn't work for me: !/src/ * pre 2.4.0 /src and /public were synced and everything else ignored |
@llindemann We are working on a fix we'll let you know when it is released |
@llindemann a fix was released with 2.4.1 |
Signed-off-by: Teresa Romero teresa@okteto.com
Fixes #2679
Proposed changes
!
do not prepend (?d)Context
Using the repo from @AgustinRamiroDiaz https://github.com/AgustinRamiroDiaz/okteto-stignore i've been going around the different possibilities. The remote
.stignore
is being parsed from the local one, we add the prefix (?d) in order to be able to delete a directory. Lines regarding#includes
or!<file or folder>
where not copied to this remote.stignore
, i thought this had to be copy to the remote file but when i did, syncing got in an infite loop whith the following error:So decided to just avoid lines starting with
!
as we do with#
, as,synthing
is using the local rules, although the remote rules are different.