nfdi4plants / ARCCommander

Tool to manage your ARCs
MIT License
11 stars 9 forks source link

[Feature Request] Do not print git message "The following paths are ignored by one of your .gitignore files:" when running arc sync #209

Closed ZimmerD closed 9 months ago

ZimmerD commented 12 months ago

Is your feature request related to a problem? Please describe. I have an arc that contains a virtual environment. I do not want to track the environment, therefore I added it to the .gitignore. However calling 'arc sync', I get this message for every file (> 200,000) in this folder: GIT: The following paths are ignored by one of your .gitignore files: GIT: .venv
Since there are so many files in the .venv, 'arc sync' takes a really long time.

Describe the solution you'd like Do not print this message for files that are ignored by the rules expressed in the .gitignore

Describe alternatives you've considered As a workaround, you can use git directly

HLWeil commented 12 months ago

This problem arises, as the ArcCommander checks for all files in the ARC and call git add for each specifically. This approach was choosen to take into account the filesize of every file and either stage it directly or stage it using git lfs if above a certain size threshold.

I see two solutions:

andreaschrader commented 12 months ago

Just an idea: Can you use the output of

git status --porcelain 

with sed or somthing similar or ´´´ git diff --name-only ´´´ and only check the file size for these files?

andreaschrader commented 12 months ago

Btw., I have in one of my ARCs the same problem for the .DS_Store files. So I assume it will be an issue for many others as well.