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/add.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/add.c')
| -rw-r--r-- | builtin/add.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin/add.c b/builtin/add.c index 0235854f80..740c7c4581 100644 --- a/builtin/add.c +++ b/builtin/add.c @@ -389,6 +389,7 @@ int cmd_add(int argc, char *seen = NULL; char *ps_matched = NULL; struct lock_file lock_file = LOCK_INIT; + struct odb_transaction *transaction; repo_config(repo, add_config, NULL); @@ -574,7 +575,7 @@ int cmd_add(int argc, string_list_clear(&only_match_skip_worktree, 0); } - begin_odb_transaction(); + transaction = begin_odb_transaction(repo->objects); ps_matched = xcalloc(pathspec.nr, 1); if (add_renormalize) @@ -593,7 +594,7 @@ int cmd_add(int argc, if (chmod_arg && pathspec.nr) exit_status |= chmod_pathspec(repo, &pathspec, chmod_arg[0], show_only); - end_odb_transaction(); + end_odb_transaction(transaction); finish: if (write_locked_index(repo->index, &lock_file, |
