diff options
author | Luca BRUNO <luca.bruno@coreos.com> | 2021-08-23 12:39:02 +0000 |
---|---|---|
committer | Luca BRUNO <luca.bruno@coreos.com> | 2021-08-23 13:31:13 +0000 |
commit | 06ff77cfeb7eef5e75528f787f8c5569cd5b2334 (patch) | |
tree | 924c3b71b5286081221eabc7902a897c6649f793 /src | |
parent | 2f675cf1b1afc8053a93077f1427bf40d98554e2 (diff) | |
download | ostree-06ff77cfeb7eef5e75528f787f8c5569cd5b2334.tar.gz |
lib/diff: ignore xattrs if disabled on either repos
This fixes the logic to detect whether xattrs should be automatically
ignored when diffing.
Diffstat (limited to 'src')
-rw-r--r-- | src/libostree/ostree-diff.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/libostree/ostree-diff.c b/src/libostree/ostree-diff.c index da018db4..e2d68d0a 100644 --- a/src/libostree/ostree-diff.c +++ b/src/libostree/ostree-diff.c @@ -268,15 +268,18 @@ ostree_diff_dirs_with_options (OstreeDiffFlags flags, /* If we're diffing versus a repo, and either of them have xattrs disabled, * then disable for both. */ - OstreeRepo *repo; if (OSTREE_IS_REPO_FILE (a)) - repo = ostree_repo_file_get_repo ((OstreeRepoFile*)a); - else if (OSTREE_IS_REPO_FILE (b)) - repo = ostree_repo_file_get_repo ((OstreeRepoFile*)b); - else - repo = NULL; - if (repo != NULL && repo->disable_xattrs) - flags |= OSTREE_DIFF_FLAGS_IGNORE_XATTRS; + { + OstreeRepo *repo = ostree_repo_file_get_repo ((OstreeRepoFile*)a); + if (repo->disable_xattrs) + flags |= OSTREE_DIFF_FLAGS_IGNORE_XATTRS; + } + if (OSTREE_IS_REPO_FILE (b)) + { + OstreeRepo *repo = ostree_repo_file_get_repo ((OstreeRepoFile*)b); + if (repo->disable_xattrs) + flags |= OSTREE_DIFF_FLAGS_IGNORE_XATTRS; + } if (a == NULL) { |