Git Product home page Git Product logo

Comments (3)

zessx avatar zessx commented on June 20, 2024

After a few tests, it works with the following settings:

version: "2"
options:
  verbose: true
syncs:
  wakeo_platform_sync:
    src: .
    sync_excludes_type: Path
    sync_excludes:
      - .git
      - tmp
      - db/backups
      - log
      - vendor
    sync_strategy: unison 
    sync_prefe: default 

It appears the sync_excludes_type is also used on the default_ignores values, which does make sense to me. If I understand this correctly, the purpose of sync_excludes_type is to simplify configuration (to not have to prepend Path Regex or Name on all excludes). But still, I am allowed to mix types, thanks to none:

    sync_excludes_type: none
    sync_excludes:
      - Path .git
      - Regex *\.log

Here is the related code portion:

def expand_ignore_strings
expanded_ignore_strings = []
exclude_type = 'Name'
exclude_type = @options['sync_excludes_type'] unless @options['sync_excludes_type'].nil?
unless @options['sync_excludes'].nil?
expanded_ignore_strings = @options['sync_excludes'].append(Environment.default_ignores).flatten!.map do |pattern|
ignore_string = if exclude_type == 'none'
# the ignore type like Name / Path are part of the pattern
pattern.to_s
else
"#{exclude_type} #{pattern}"
end
"-ignore='#{ignore_string}'"
end
end
expanded_ignore_strings
end

I think sync_excludes_type should be kept/used for user exclusions only. Default exclusions should be fully defined with their Unison prefix.

from docker-sync.

EugenMayer avatar EugenMayer commented on June 20, 2024

thanks to #821 and #820 this will be fixed in 1.0.2 - thank you everyone for helping out

from docker-sync.

yosephsa avatar yosephsa commented on June 20, 2024

@EugenMayer & @zessx This is not completely fixed yet. That change needs to happen on native_osx sync strategy as it also uses the exclude_type Name and will throw the same error if set to none

from docker-sync.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.