fsck: Only print "marking commit partial" once
Let's only print if the commit isn't already partial; this addresses a spam of "marking commit partial" from fsck. Closes: #1548 Approved by: cgwalters
This commit is contained in:
1 parent
6d01d82b9b
commit
41b97e9c12
3 files changed
+14
-6
No files matched your search
@@ -99,9 +99,16 @@ fsck_one_object (OstreeRepo *repo,
|
||||
for (i = 0; parent_commits[i] != NULL; i++)
|
||||
{
|
||||
const char *parent_commit = parent_commits[i];
|
||||
g_printerr ("Marking commit %s as partial\n", parent_commit);
|
||||
if (!ostree_repo_mark_commit_partial (repo, parent_commit, TRUE, error))
|
||||
OstreeRepoCommitState state;
|
||||
if (!ostree_repo_load_commit (repo, parent_commit, NULL,
|
||||
&state, error))
|
||||
return FALSE;
|
||||
if ((state & OSTREE_REPO_COMMIT_STATE_PARTIAL) == 0)
|
||||
{
|
||||
g_printerr ("Marking commit as partial: %s\n", parent_commit);
|
||||
if (!ostree_repo_mark_commit_partial (repo, parent_commit, TRUE, error))
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user