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 /builtin/update-index.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 'builtin/update-index.c')
| -rw-r--r-- | builtin/update-index.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/builtin/update-index.c b/builtin/update-index.c index 2380f3ccd6..2ba2d29c95 100644 --- a/builtin/update-index.c +++ b/builtin/update-index.c @@ -77,7 +77,7 @@ static void report(const char *fmt, ...) * objects invisible while a transaction is active, so flush the * transaction here before reporting a change made by update-index. */ - flush_odb_transaction(); + flush_odb_transaction(the_repository->objects->transaction); va_start(vp, fmt); vprintf(fmt, vp); putchar('\n'); @@ -940,6 +940,7 @@ int cmd_update_index(int argc, strbuf_getline_fn getline_fn; int parseopt_state = PARSE_OPT_UNKNOWN; struct repository *r = the_repository; + struct odb_transaction *transaction; struct option options[] = { OPT_BIT('q', NULL, &refresh_args.flags, N_("continue refresh even when index needs update"), @@ -1130,7 +1131,7 @@ int cmd_update_index(int argc, * Allow the object layer to optimize adding multiple objects in * a batch. */ - begin_odb_transaction(); + transaction = begin_odb_transaction(the_repository->objects); while (ctx.argc) { if (parseopt_state != PARSE_OPT_DONE) parseopt_state = parse_options_step(&ctx, options, @@ -1213,7 +1214,7 @@ int cmd_update_index(int argc, /* * By now we have added all of the new objects */ - end_odb_transaction(); + end_odb_transaction(transaction); if (split_index > 0) { if (repo_config_get_split_index(the_repository) == 0) |
