nfdi4plants/ARCCommander

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

ZimmerD opened this issue · 3 comments

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

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:

  • The API could take the .gitignore file into account and only stage if not ignored
  • Check if explicit add is necessary for lfs tracking. If not, use git add . instead

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?

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.