mirror of
https://github.com/ostreedev/ostree.git
synced 2025-01-11 09:18:20 +03:00
commit: Allow skipping automatic summary generation
If a commit is being made during summary generation, then it would trigger the summary to be generated again. That's either unwanted busy work or could result in an infinite loop. Add a boolean in `OstreeRepoTxn` to disable automatic summary generation as seen fit.
This commit is contained in:
parent
582d7071d2
commit
b2f02337f8
@ -2350,7 +2350,8 @@ ostree_repo_commit_transaction (OstreeRepo *self,
|
|||||||
/* Update the summary if auto-update-summary is set, because doing so was
|
/* Update the summary if auto-update-summary is set, because doing so was
|
||||||
* delayed for each ref change during the transaction.
|
* delayed for each ref change during the transaction.
|
||||||
*/
|
*/
|
||||||
if ((self->txn.refs || self->txn.collection_refs) &&
|
if (!self->txn.disable_auto_summary &&
|
||||||
|
(self->txn.refs || self->txn.collection_refs) &&
|
||||||
!_ostree_repo_maybe_regenerate_summary (self, cancellable, error))
|
!_ostree_repo_maybe_regenerate_summary (self, cancellable, error))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -101,6 +101,7 @@ typedef struct {
|
|||||||
/* Implementation of min-free-space-percent */
|
/* Implementation of min-free-space-percent */
|
||||||
gulong blocksize;
|
gulong blocksize;
|
||||||
fsblkcnt_t max_blocks;
|
fsblkcnt_t max_blocks;
|
||||||
|
gboolean disable_auto_summary;
|
||||||
} OstreeRepoTxn;
|
} OstreeRepoTxn;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user