diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-09-09 14:46:00 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-09-09 14:46:00 -0700 |
| commit | 4a3422b1617daca3a1e4f1173618632ad558a90c (patch) | |
| tree | 8d581d8046d355fe42f7561904769c00d82588e7 /read-cache.c | |
| parent | The seventh batch (diff) | |
| parent | bulk-checkin: use repository variable from transaction (diff) | |
| download | git-4a3422b1617daca3a1e4f1173618632ad558a90c.tar.gz git-4a3422b1617daca3a1e4f1173618632ad558a90c.zip | |
Merge branch 'jt/de-global-bulk-checkin' into jt/odb-transaction
* jt/de-global-bulk-checkin:
bulk-checkin: use repository variable from transaction
bulk-checkin: require transaction for index_blob_bulk_checkin()
bulk-checkin: remove global transaction state
bulk-checkin: introduce object database transaction structure
Diffstat (limited to 'read-cache.c')
| -rw-r--r-- | read-cache.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/read-cache.c b/read-cache.c index 06ad74db22..229b8ef11c 100644 --- a/read-cache.c +++ b/read-cache.c @@ -3947,6 +3947,7 @@ int add_files_to_cache(struct repository *repo, const char *prefix, const struct pathspec *pathspec, char *ps_matched, int include_sparse, int flags) { + struct odb_transaction *transaction; struct update_callback_data data; struct rev_info rev; @@ -3972,9 +3973,9 @@ int add_files_to_cache(struct repository *repo, const char *prefix, * This function is invoked from commands other than 'add', which * may not have their own transaction active. */ - begin_odb_transaction(); + transaction = begin_odb_transaction(repo->objects); run_diff_files(&rev, DIFF_RACY_IS_MODIFIED); - end_odb_transaction(); + end_odb_transaction(transaction); release_revisions(&rev); return !!data.add_errors; |
