git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jonathan Tan <jonathantanmy@google.com>
To: git@vger.kernel.org
Cc: Jonathan Tan <jonathantanmy@google.com>, newren@gmail.com
Subject: [PATCH 0/3] More add_submodule_odb() cleanup in merge code
Date: Wed,  8 Sep 2021 11:18:12 -0700	[thread overview]
Message-ID: <cover.1631123754.git.jonathantanmy@google.com> (raw)

(CC-ing Elijah in case he has insight into the merge-ort part.)

While continuing the effort into removing add_submodule_odb() (as part
of the submodule partial clone effort) I came across this part of the
merge code that specifies the repository being operated on in two ways:
one as a struct repository pointer and the other as a path. This patch
set unifies the two.

I normally would not send refactoring patches unless I also have a
feature patch that uses the results of said refactoring, but in this
case, I think that these patches are worth having since they clarify a
potentially unclear part of the API.

Note that these patches mean that the merging code no longer supports
submodules that have their .git dirs in the worktree, but from what I
can tell, this seems to be the direction we're going in
(repo_submodule_init() does not support such submodules).

Patch 3 is included to show how I'm verifying some things. Including
something like that in the master branch would probably require
conditional compilation (to exclude the additional field in struct
object used for checking, among other things), so I'm just including it
here for informational purposes.

All these patches work under GIT_TEST_MERGE_ALGORITHM=recursive and
GIT_TEST_MERGE_ALGORITHM=ort (and when that envvar is unset, for good
measure).

Jonathan Tan (3):
  t6437: run absorbgitdirs on repos
  revision: remove "submodule" from opt struct
  DO NOT SUBMIT commit-reach,revision: verify non-mixing

 alloc.c                    |  2 +
 commit-reach.c             | 60 +++++++++++++++++-------
 merge-ort.c                | 55 +++++++++++++++-------
 merge-recursive.c          | 51 +++++++++++++-------
 object.h                   |  1 +
 revision.c                 | 96 ++++++++++++++++++++++----------------
 revision.h                 |  1 -
 t/t6437-submodule-merge.sh |  9 ++--
 8 files changed, 179 insertions(+), 96 deletions(-)

-- 
2.33.0.309.g3052b89438-goog


             reply	other threads:[~2021-09-08 18:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-08 18:18 Jonathan Tan [this message]
2021-09-08 18:18 ` [PATCH 1/3] t6437: run absorbgitdirs on repos Jonathan Tan
2021-09-08 22:02   ` Jonathan Tan
2021-09-08 22:20   ` Junio C Hamano
2021-09-09 17:47     ` Jonathan Tan
2021-09-08 18:18 ` [PATCH 2/3] revision: remove "submodule" from opt struct Jonathan Tan
2021-09-08 18:18 ` [PATCH 3/3] DO NOT SUBMIT commit-reach,revision: verify non-mixing Jonathan Tan
2021-09-09 15:26 ` [PATCH 0/3] More add_submodule_odb() cleanup in merge code Elijah Newren
2021-09-09 17:51   ` Jonathan Tan
2021-09-09 18:47 ` [PATCH v2 " Jonathan Tan
2021-09-09 18:47   ` [PATCH v2 1/3] submodule: remove unnecessary unabsorbed fallback Jonathan Tan
2021-09-09 18:47   ` [PATCH v2 2/3] repository: support unabsorbed in repo_submodule_init Jonathan Tan
2021-09-09 18:47   ` [PATCH v2 3/3] revision: remove "submodule" from opt struct Jonathan Tan
2021-09-14  1:31   ` [PATCH v2 0/3] More add_submodule_odb() cleanup in merge code 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=cover.1631123754.git.jonathantanmy@google.com \
    --to=jonathantanmy@google.com \
    --cc=git@vger.kernel.org \
    --cc=newren@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).