git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Neeraj K. Singh via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Neeraj Singh <nksingh85@gmail.com>,
	"Neeraj K. Singh" <neerajsi@microsoft.com>
Subject: [PATCH v2 0/2] ns/tmp-objdir: add support for temporary writable databases
Date: Mon, 06 Dec 2021 00:36:03 +0000	[thread overview]
Message-ID: <pull.1091.v2.git.1638750965.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1091.git.1638585658.gitgitgadget@gmail.com>

V2 changes: I lost a couple changes in the shuffle while splitting these
changes out

 * Make the will-destroy boolean a single bit field of type unsigned int so
   that it doesn't change twice in this small patch series.
 * Remove a the_repository reference in the disable ref updates code. Now
   the repository is taken from the ref_store.

New interface into the tmp-objdir API to help in-core use of the quarantine
feature.

This patch series was formerly part of the ns/batched-fsync topic [1]. It's
now split out into its own gitgitgadget PR and discussion thread since it is
the base for en/remerge-diff as well.

The most recent feedback was in [2]. I removed printing from prune_subdir
and simplified the strbuf handling in prune_tmp_file.

References: [1]
https://lore.kernel.org/git/pull.1076.v9.git.git.1637020263.gitgitgadget@gmail.com/
[2]
https://lore.kernel.org/git/CABPp-BH6m4q_EoX77bqLcpCN1HRfJ_XayeCV2O0sRybX53rPrw@mail.gmail.com/

Neeraj Singh (2):
  tmp-objdir: new API for creating temporary writable databases
  tmp-objdir: disable ref updates when replacing the primary odb

 builtin/prune.c        | 20 ++++++++++++---
 builtin/receive-pack.c |  2 +-
 environment.c          |  9 +++++++
 object-file.c          | 50 ++++++++++++++++++++++++++++++++++++--
 object-store.h         | 26 ++++++++++++++++++++
 object.c               |  2 +-
 refs.c                 |  2 +-
 repository.c           |  2 ++
 repository.h           |  1 +
 tmp-objdir.c           | 55 +++++++++++++++++++++++++++++++++++++++---
 tmp-objdir.h           | 29 +++++++++++++++++++---
 11 files changed, 183 insertions(+), 15 deletions(-)


base-commit: cd3e606211bb1cf8bc57f7d76bab98cc17a150bc
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1091%2Fneerajsi-msft%2Fns%2Ftmp-objdir-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1091/neerajsi-msft/ns/tmp-objdir-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/1091

Range-diff vs v1:

 1:  4ae4303595e ! 1:  36c00613d9a tmp-objdir: new API for creating temporary writable databases
     @@ object-store.h: struct object_directory {
      +	/*
      +	 * This object store is ephemeral, so there is no need to fsync.
      +	 */
     -+	int will_destroy;
     ++	unsigned int will_destroy : 1;
      +
       	/*
       	 * Path to the alternative object store. If this is a relative path,
 2:  d8ae001500c ! 2:  f667cbcc47d tmp-objdir: disable ref updates when replacing the primary odb
     @@ object-store.h: struct object_directory {
       	/*
       	 * This object store is ephemeral, so there is no need to fsync.
       	 */
     --	int will_destroy;
     -+	unsigned int will_destroy : 1;
     - 
     - 	/*
     - 	 * Path to the alternative object store. If this is a relative path,
      
       ## refs.c ##
      @@ refs.c: int ref_transaction_prepare(struct ref_transaction *transaction,
     @@ refs.c: int ref_transaction_prepare(struct ref_transaction *transaction,
       	}
       
      -	if (getenv(GIT_QUARANTINE_ENVIRONMENT)) {
     -+	if (the_repository->objects->odb->disable_ref_updates) {
     ++	if (refs->repo->objects->odb->disable_ref_updates) {
       		strbuf_addstr(err,
       			      _("ref updates forbidden inside quarantine environment"));
       		return -1;

-- 
gitgitgadget

  parent reply	other threads:[~2021-12-06  0:36 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-04  2:40 [PATCH 0/2] ns/tmp-objdir: add support for temporary writable databases Neeraj K. Singh via GitGitGadget
2021-12-04  2:40 ` [PATCH 1/2] tmp-objdir: new API for creating " Neeraj Singh via GitGitGadget
2021-12-04  2:40 ` [PATCH 2/2] tmp-objdir: disable ref updates when replacing the primary odb Neeraj Singh via GitGitGadget
2021-12-05 18:23   ` Junio C Hamano
2021-12-05 23:44     ` Neeraj Singh
2021-12-05 23:56       ` Junio C Hamano
2021-12-06  3:10         ` Neeraj Singh
2021-12-06  0:36 ` Neeraj K. Singh via GitGitGadget [this message]
2021-12-06  0:36   ` [PATCH v2 1/2] tmp-objdir: new API for creating temporary writable databases Neeraj Singh via GitGitGadget
2021-12-06  7:43     ` Junio C Hamano
2021-12-06  8:53       ` Neeraj Singh
2021-12-06 17:39         ` Junio C Hamano
2021-12-06  0:36   ` [PATCH v2 2/2] tmp-objdir: disable ref updates when replacing the primary odb Neeraj Singh via GitGitGadget
2021-12-06  3:12     ` Neeraj Singh
2021-12-06 22:05   ` [PATCH v3 0/2] ns/tmp-objdir: add support for temporary writable databases Neeraj K. Singh via GitGitGadget
2021-12-06 22:05     ` [PATCH v3 1/2] tmp-objdir: new API for creating " Neeraj Singh via GitGitGadget
2021-12-06 22:05     ` [PATCH v3 2/2] tmp-objdir: disable ref updates when replacing the primary odb Neeraj Singh via GitGitGadget
2021-12-08 16:41     ` [PATCH v3 0/2] ns/tmp-objdir: add support for temporary writable databases Elijah Newren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pull.1091.v2.git.1638750965.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=neerajsi@microsoft.com \
    --cc=nksingh85@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).