git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lars Hjemli <hjemli@gmail.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH 2/3] Teach read_tree_recursive() how to traverse into  submodules
Date: Sun, 18 Jan 2009 22:31:28 +0100	[thread overview]
Message-ID: <8c5c35580901181331v5e54f82fxc6a042962ff1cd06@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.1.00.0901182201140.3586@pacific.mpi-cbg.de>

On Sun, Jan 18, 2009 at 22:02, Johannes Schindelin
<Johannes.Schindelin@gmx.de> wrote:
> Hi,
>
> On Sun, 18 Jan 2009, Lars Hjemli wrote:
>
>> On Sun, Jan 18, 2009 at 19:33, Johannes Schindelin
>> <Johannes.Schindelin@gmx.de> wrote:
>> > On Sun, 18 Jan 2009, Lars Hjemli wrote:
>> >> Actually, I want this to work for bare repositories by specifying the
>> >> submodule odbs in the alternates file. So if the current submodule odb
>> >> wasn't found my plan was to check if the commit object was accessible
>> >> anyways but don't die() if it wasn't.
>> >
>> > Please make that an explicit option (cannot think of a good name, though),
>> > otherwise I will not be able to use your feature.  Making it the default
>> > would be inconsistent with the rest of our submodules framework.
>>
>> Would a test on is_bare_repository() suffice for your use-case?
>
> No.  Inconsistent is inconsistent.
>
>> If this isn't good enough, how do you propose it be solved?
>
> As I said, with an extra option that you _have_ to pass when you want
> that behavior.

My concern is how to discern between wanted and unwanted submodules in
a bare repository.

With my proposed solution `git archive --submodules HEAD` in a bare
repository would only include the content of the submodule repos
listed in objects/info/alternates (since the commit referenced by the
gitlink would then be reachable).

But you mentioned that you had a repository where all the objects of
all the submodules where stored in the odb of the superproject. With
my solution, `git archive --submodules HEAD` in your (bare) repo would
then always include the content of all the submodules (since all the
objects would always be reachable), and I believe this is the behavior
you don't like.

So, would you rather have something like `git archive --submodules=foo
--submodules=bar HEAD` to explicitly tell which submodule paths to
include in the archive when executed in a bare repo?

--
larsh

  reply	other threads:[~2009-01-18 21:32 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-18 10:53 [PATCH 0/3] Implement 'git archive --submodules' Lars Hjemli
2009-01-18 10:53 ` [PATCH 1/3] sha1_file: add function to insert alternate object db Lars Hjemli
2009-01-18 10:53   ` [PATCH 2/3] Teach read_tree_recursive() how to traverse into submodules Lars Hjemli
2009-01-18 10:53     ` [PATCH 3/3] git-archive: add support for --submodules Lars Hjemli
2009-01-18 15:51       ` Johannes Schindelin
2009-01-18 15:48     ` [PATCH 2/3] Teach read_tree_recursive() how to traverse into submodules Johannes Schindelin
2009-01-18 17:45       ` Lars Hjemli
2009-01-18 18:33         ` Johannes Schindelin
2009-01-18 19:45           ` Lars Hjemli
2009-01-18 21:02             ` Johannes Schindelin
2009-01-18 21:31               ` Lars Hjemli [this message]
2009-01-18 21:55                 ` Johannes Schindelin
2009-01-18 22:46                   ` Lars Hjemli
2009-01-19  1:24                     ` Johannes Schindelin
2009-01-19  2:01                       ` [PATCH/RFC v1 1/1] bug fix, diff whitespace ignore options Keith Cascio
2009-01-19  3:53                         ` Johannes Schindelin
2009-01-19 18:03                           ` [PATCH/RFC v2 " Keith Cascio
2009-01-19 18:36                             ` Johannes Schindelin
2009-01-20  7:04                             ` Junio C Hamano
2009-01-19  3:02         ` [PATCH 2/3] Teach read_tree_recursive() how to traverse into submodules Junio C Hamano
2009-01-18 16:13     ` René Scharfe
2009-01-18 16:37       ` Lars Hjemli
2009-01-18 19:00         ` Junio C Hamano
2009-01-18 19:50           ` Lars Hjemli
2009-01-18 15:32   ` [PATCH 1/3] sha1_file: add function to insert alternate object db Johannes Schindelin
2009-01-18 15:55     ` [PATCH] " Lars Hjemli

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

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

  git send-email \
    --in-reply-to=8c5c35580901181331v5e54f82fxc6a042962ff1cd06@mail.gmail.com \
    --to=hjemli@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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.
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 NNTP newsgroup(s).