`ADD --keep-git-dir` support missing
Hi there!
I'm happy to see that the ADD now supports git repositories, however, Docker supports a --keep-git-dir flag which allows you to interact with the repository if you want to fetch tags or anything else after.
Can we look into adding support for that to provide parity?
Thanks, Mohammed
Not sure I understood the issue. Do you want to be able to use --keep-git-dir to not fetch the git directory? That flag doesn't affect fetching tags or other git objects. You should be able to fetch tags and branches with the current implementation btw.
https://github.com/containers/buildah/blob/833420ea0b4f1d7944faa2400b67331f6c8aad92/tests/bud.bats#L7036-L7037
I just ran into this issue too. The --keep-git-dir is helpful when you want to subsequently fetch submodules with git submodule update --init --recursive which requires the .git directory to be present.