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

config-bot: support full path in skip-files #133

Open
jlebon opened this issue Mar 25, 2021 · 0 comments
Open

config-bot: support full path in skip-files #133

jlebon opened this issue Mar 25, 2021 · 0 comments

Comments

@jlebon
Copy link
Member

jlebon commented Mar 25, 2021

With coreos/fedora-coreos-config#740, we'll want to sync everything except ci/buildroot/Dockerfile, but skip-files doesn't support full paths right now, just top-level entries. Briefly played with

diff --git a/config-bot/main b/config-bot/main
index 802890a..ca69b17 100755
--- a/config-bot/main
+++ b/config-bot/main
@@ -257,8 +257,8 @@ async def propagate_files(cfg):
                 continue

             # get the list of files from the source ref
-            all_files = git.cmd_output('ls-tree', source_ref,
-                                       '--name-only').splitlines()
+            all_files = git.cmd_output('ls-tree', source_ref, '--name-only',
+                                       '--full-tree', '-r').splitlines()
             files_to_import = [f for f in all_files
                                if not matches_patterns(f, skip_files)]

But all those files are then passed as cmdline args to git checkout which is hacky. We should find a cleaner way to have rsync --delete-like semantics.

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

No branches or pull requests

1 participant