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

Root gitignore/neuroignore are ignored when copying subdirectories #1901

Closed
atemate opened this issue Dec 12, 2020 · 3 comments · Fixed by #2108
Closed

Root gitignore/neuroignore are ignored when copying subdirectories #1901

atemate opened this issue Dec 12, 2020 · 3 comments · Fixed by #2108
Assignees
Labels
bug Something isn't working

Comments

@atemate
Copy link
Contributor

atemate commented Dec 12, 2020

My project:

$ tree -a
.
├── config
│   ├── ignored
│   └── valid
├── .git
├── .gitignore
└── src
    └── valid

$ cat .gitignore 
ignored/

When doing neuro cp , .gitignore file is correctly considered and ignored/ is excluded:

$ neuro cp -r . storage:test
Expand file:///home/ay/github/temp/10
[13:50:07] Copying /home/ay/github/temp/10 => storage://neuro-compute/artemyushkovskiy/test/10                                                                                                                     
[13:50:08] Starting copying directory /home/ay/github/temp/10                                                                                                                                                      
exclude 'ignored/'
           Copying: /home/ay/github/temp/10/.gitignore                                                                                                                                                             
[13:50:09] Starting copying directory /home/ay/github/temp/10/src                                                                                                                                                  
           Copied: /home/ay/github/temp/10/.gitignore                                                                                                                                                              
           Starting copying directory /home/ay/github/temp/10/src/valid                                                                                                                                            
           Finished copying directory /home/ay/github/temp/10/src/valid                                                                                                                                            
           Finished copying directory /home/ay/github/temp/10/src                                                                                                                                                  
[13:50:10] Starting copying directory /home/ay/github/temp/10/config                                                                                                                                               
           Starting copying directory /home/ay/github/temp/10/config/valid                                                                                                                                         
           Finished copying directory /home/ay/github/temp/10/config/valid                                                                                                                                         
           Finished copying directory /home/ay/github/temp/10/config                                                                                                                                               
           Finished copying directory /home/ay/github/temp/10                                                                                                                                                      

However, when copying a sub-directory, .gitignore is not considered:

$ neuro cp -r ./config/ storage:test
Expand file:///home/ay/github/temp/10/config
[13:50:20] Copying /home/ay/github/temp/10/config => storage://neuro-compute/artemyushkovskiy/test/config                                                                                                          
           Starting copying directory /home/ay/github/temp/10/config                                                                                                                                               
[13:50:21] Starting copying directory /home/ay/github/temp/10/config/valid                                                                                                                                         
           Finished copying directory /home/ay/github/temp/10/config/valid                                                                                                                                         
           Starting copying directory /home/ay/github/temp/10/config/ignored                                                                                                                                       
           Finished copying directory /home/ay/github/temp/10/config/ignored                                                                                                                                       
           Finished copying directory /home/ay/github/temp/10/config                                                                                                                                               

Do we have a concept of project root (similar to .git/) to be able to implement the semantics of neuro-cp similar to git operations (i.e. .gitignore is valid for current directory and all its subdirectories)?

@atemate atemate changed the title Root ritignore/neuroignore are ignored when copying subdirectories Root gitignore/neuroignore are ignored when copying subdirectories Dec 12, 2020
@github-actions
Copy link

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 14 days

@serhiy-storchaka
Copy link
Contributor

@YevheniiSemendiak also reported this issue.

@YevheniiSemendiak YevheniiSemendiak added bug Something isn't working and removed Stale labels Apr 28, 2021
@YevheniiSemendiak
Copy link
Contributor

Temporal workaround:
Put a dedicated .gitignore file (or a symlink to the original one) inside the subdirectory (config) with the names, which are needed to be ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants