Skip to content
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

Req: option for only overriding all normal files #23

Open
gzm55 opened this issue Aug 19, 2017 · 3 comments
Open

Req: option for only overriding all normal files #23

gzm55 opened this issue Aug 19, 2017 · 3 comments

Comments

@gzm55
Copy link

gzm55 commented Aug 19, 2017

Hi,

When stowing packages, I need to only override all normal files but split all dirs. If use option --override='.*', it will make all folded dirs to be overrided as a whole link, not splitted. So how to do this or need a new option?

@aspiers
Copy link
Owner

aspiers commented Feb 11, 2018

Hi, really sorry for the incredibly slow response! I'm having trouble understanding your question, because --override already only applies to files not directories. I'm wondering if you want the --no-folding option; did you look at that?

But if that doesn't do what you want, please could you give a minimal test case explaining how the current behaviour differs from what you would want / expect? Thanks!

@gzm55
Copy link
Author

gzm55 commented Feb 12, 2018

Hi @aspiers , thank you for your response. Here is a minimal test case, we have a simple file tree for stow:

james@jamespc-15:~/work/test-stow/issue-13/stow$ tree ..
..
└── stow
    ├── A
    │   ├── a.txt
    │   └── dir
    │       ├── b.txt
    │       └── c.txt
    └── B
        ├── a.txt
        └── dir
            ├── c.txt
            └── d.txt

Package A and B both maintain a version of a.txt and dir/c.txt, and I want A be a fallback of B. Then I run the following codes:

$ stow --version
stow (GNU Stow) version 2.2.2
$ stow A
$ stow B  --override='.*'

The current behavior is:

$ tree -I stow ..
..
├── a.txt -> stow/B/a.txt
└── dir -> stow/B/dir

And the expect is:

$ tree -I stow ..
..
├── a.txt -> stow/B/a.txt
└── dir
    ├── b.txt -> ../stow/A/dir/b.txt
    ├── c.txt -> ../stow/B/dir/c.txt
    └── d.txt -> ../stow/B/dir/d.txt

@gzm55
Copy link
Author

gzm55 commented Feb 12, 2018

I have looked at the '--no-folding' option, but it really unfold too much. IMO, the smart way is 'unfold-if-override-a-dir'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants