All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phil Sainty <phil@catalyst.net.nz>
To: pclouds@gmail.com
Cc: git@vger.kernel.org,hvoigt@hvoigt.net,me@ikke.info,rafa.almas@gmail.com
Subject: Re: Adding nested repository with slash adds files instead of gitlink
Date: Thu, 08 Aug 2024 23:20:18 +1200	[thread overview]
Message-ID: <s5wr0azfeh9.fsf@catalyst.net.nz> (raw)
In-Reply-To: <CACsJy8CW1=Ea984s8J0Y6y4B6qJKZMdsXVFRQc8YcuoQNfXEqw@mail.gmail.com>

> On Wed, Jun 20, 2018 at 1:55 PM Rafael Ascensão <rafa.almas@gmail.com> wrote:
> > On Wed, Jun 20, 2018 at 5:39 AM Kevin Daudt <me@ikke.info> wrote:
> > > What this is about that when doing `git add path/` (with trailing /),
> >
> > This is what I was referring to. If you search for 'Fake Submodules',
> > you'll see that some people were/are intentionally using this instead of
> > subtrees or submodules. Unfortunately the original article [1] seems to
> > be dead, but searching url in the mailing list archives leads to some
> > additional discussion on the subject [2,3].
>
> Abusing a long standing bug does not make it a feature. I'm not
> opposed to having a new option to keep that behavior, but it should
> not be the default. If you use it that way, you're on your own.

Was such an option ever worked on?

(I.e. a way to git-add some sub-directory 'foo' which contains another
repository, and have git-add act as if foo/.git didn't exist -- simply
adding the (other) contents of foo to the containing repo's index.)

I haven't spotted anything in the git-add man page for v2.34, nor in the
release notes for subsequent git versions.

The old behaviour was a genuinely useful ability which I've used a great
in the past, and if there's any convenient way to achieve the same thing
nowadays, I've failed to find it.  (One can temporarily move the nested
.git directory elsewhere, run git-add, and then move the .git directory
back again; but that's frustratingly cumbersome by comparison).

If I haven't missed some existing solution, could a new git-add option
for restoring this ability be implemented?


-Phil


> > [1]:http://debuggable.com/posts/git-fake-submodules:4b563ee4-f3cc-4061-967e-0e48cbdd56cb
> > [2]:https://public-inbox.org/git/xmqqy47o6q71.fsf@gitster.mtv.corp.google.com/
> > [3]:https://public-inbox.org/git/CAGZ79kZofg3jS+g0weTdco+PGo_p-_Hd-NScZ=q2UfB7tF2GPA@mail.gmail.com/

  parent reply	other threads:[~2024-08-08 11:29 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-18 11:19 Adding nested repository with slash adds files instead of gitlink Heiko Voigt
2018-06-18 15:06 ` Duy Nguyen
2018-06-18 18:12   ` Brandon Williams
2018-06-19 10:36     ` Heiko Voigt
2018-06-19 15:16       ` Duy Nguyen
2018-06-19 15:56         ` Junio C Hamano
2018-06-19 16:11           ` Duy Nguyen
2018-06-19 16:09         ` Duy Nguyen
2018-06-19 16:20           ` Duy Nguyen
2018-06-18 15:55 ` Kevin Daudt
2018-06-19 10:27   ` Heiko Voigt
2018-06-19 22:29     ` Rafael Ascensão
2018-06-20  4:39       ` Kevin Daudt
2018-06-20 11:52         ` Rafael Ascensão
2018-06-20 14:57           ` Duy Nguyen
2018-06-20 16:21             ` Rafael Ascensão
2024-08-08 11:20             ` Phil Sainty [this message]
2024-08-08 16:35               ` Junio C Hamano
2024-08-13 12:48                 ` Johannes Schindelin
2024-08-13 17:18                   ` Junio C Hamano
2024-08-13 23:13                     ` Phil Sainty
2024-08-14 12:00                       ` Johannes Schindelin

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=s5wr0azfeh9.fsf@catalyst.net.nz \
    --to=phil@catalyst.net.nz \
    --cc=git@vger.kernel.org \
    --cc=hvoigt@hvoigt.net \
    --cc=me@ikke.info \
    --cc=pclouds@gmail.com \
    --cc=rafa.almas@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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.