git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jonathan Tan <jonathantanmy@google.com>
To: newren@gmail.com
Cc: jonathantanmy@google.com, git@vger.kernel.org
Subject: Re: [PATCH 0/3] More add_submodule_odb() cleanup in merge code
Date: Thu,  9 Sep 2021 10:51:52 -0700	[thread overview]
Message-ID: <20210909175152.2550626-1-jonathantanmy@google.com> (raw)
In-Reply-To: <CABPp-BGKBMtue-T1ah-+RQHJ+ceYBVsqs54Vx0p-Hs+UkLXPtw@mail.gmail.com>

> On Wed, Sep 8, 2021 at 11:18 AM Jonathan Tan <jonathantanmy@google.com> wrote:
> >
> > (CC-ing Elijah in case he has insight into the merge-ort part.)
> 
> All the submodule merging related functions were lifted from
> merge-recursive.c and minimally modified to fit the new structure.
> The only substantive change I made was to fix the merge result for
> virtual merge bases, but that's like one or two lines of code.  In
> particular, everything relating to submodule objects was totally
> untouched...and I think that's reflected in the fact that your PATCH 2
> basically is the same patch twice, once for merge-recursive and once
> for merge-ort.
> 
> I read over PATCH 2 and I didn't find anything that looked
> problematic, but I'm not up-to-speed on the add_submodule_odb and repo
> handling bits of the codebase so I'm not sure I would catch anything.
> But I am encouraged by the fact that it looks like you did the same
> stuff to merge-recursive and merge-ort; I'd be worried you missed
> something if that weren't the case.

Thanks for taking a look.

> As a sidenote, though...
> 
> This does remind me that I noticed that the following functions from
> object-store.h do not take an explicit repository:
> 
> write_object_file()
> hash_object_file()
> hash_object_file_literally()
> force_object_loose()
> 
> I have a patch sitting around somewhere (possibly only still
> referenced in my 'temp' branch) to make repo_*() variants of the above
> functions, and turn the above into simple wrappers of the repo_*()
> variants which just pass the_repository (much like someone else did
> with read_object_file() and repo_read_object_file()).  It also updates
> merge-ort to use the new repo_*() functions.  However, I ended up
> excluding it from my merge-ort submissions since it wasn't necessary.
> Would this be of interest in your submodule work, though?  I guess
> it'd only matter if we started doing real merges of submodules as part
> of a parent repo merge.  (As opposed to the fast-forward-only merges
> that merge-recursive/merge-ort do right now for submodules.)

I think that these functions would be useful if we were to write into
submodules (for example, in a real merge of submodules, as you said).
Right now my submodule work is just making it support partial clones, so
I'm not planning to introduce any new submodule writes. (Well, besides
the fact that a lazy-fetch in a submodule would end up with new objects,
but that's already handled because we do the fetch in a separate process
in the submodule's gitdir.)

  reply	other threads:[~2021-09-09 17:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-08 18:18 [PATCH 0/3] More add_submodule_odb() cleanup in merge code Jonathan Tan
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 [this message]
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=20210909175152.2550626-1-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).