git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Atharva Raykar <raykar.ath@gmail.com>
Cc: Mugdha Pattnaik via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org, mugdha <mugdhapattnaik@gmail.com>
Subject: Re: [PATCH v2] submodule: absorb git dir instead of dying on deinit
Date: Fri, 27 Aug 2021 10:28:51 -0700	[thread overview]
Message-ID: <xmqqsfyuajak.fsf@gitster.g> (raw)
In-Reply-To: <m28s0nc8gv.fsf@gmail.com> (Atharva Raykar's message of "Fri, 27 Aug 2021 18:50:23 +0530")

Atharva Raykar <raykar.ath@gmail.com> writes:

> "Mugdha Pattnaik via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
>> From: mugdha <mugdhapattnaik@gmail.com>
>>
>> Currently, running 'git submodule deinit' on repos where the
>> submodule's '.git' is a folder aborts with a message that is not
>> exactly user friendly. Let's change this to instead warn the user
>> to rerun the command with '--force'.
>
> This makes sense, a lot of commands seem to follow this pattern of
> requiring a user to '--force' when the behaviour might not be different
> from what is normally expected.
>
>> This internally calls 'absorb_git_dir_into_superproject()', which
>> moves the '.git' folder into the superproject and replaces it with
>> a '.git' file. The rest of the deinit function can operate as it
>> already does with new-style submodules.
>
> Nice. Just like what the NEEDSWORK comment suggested.

Indeed.  Many use of the word "folder", especially when the thing is
called "git dir" in the title, irritates me, though.  We use files
and directories, not folders.

> BTW, I see you linked downthread the documentation[1] which says:
>
>   When [old-form submodules] deinitialized or deleted (see below), the
>   submodule’s Git directory is automatically moved to
>   $GIT_DIR/modules/<name>/ of the superproject.
>
> This was not what Git was doing before this patch, it used to die() out
> instead. So I think this actually is a bug fix (although I am not sure
> why the test suite also did not agree with the documentation).

Curious.

I see the description was added by d4803455 (submodules: overhaul
documentation, 2017-06-22), which claimed to "detangle" by "move"
various existing pieces of documentation into a new file.

I guess we added a wish without marking it as such ;-)

  reply	other threads:[~2021-08-27 17:30 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-26 18:33 [PATCH] submodule: absorb git dir instead of dying on deinit Mugdha Pattnaik via GitGitGadget
2021-08-27  6:03 ` [PATCH v2] " Mugdha Pattnaik via GitGitGadget
2021-08-27 13:20   ` Atharva Raykar
2021-08-27 17:28     ` Junio C Hamano [this message]
2021-08-27 18:10   ` [PATCH v3] " Mugdha Pattnaik via GitGitGadget
2021-08-27 18:51     ` [PATCH v4] " Mugdha Pattnaik via GitGitGadget
2021-09-28  7:30       ` Christian Couder
2021-09-28  9:53       ` Ævar Arnfjörð Bjarmason
2021-10-06 11:45         ` Mugdha Pattnaik
2021-10-06 12:02       ` [PATCH v5] " Mugdha Pattnaik via GitGitGadget
2021-10-06 12:24         ` [PATCH v6] " Mugdha Pattnaik via GitGitGadget
2021-10-07 19:41           ` Junio C Hamano
2021-11-16 18:20             ` Mugdha Pattnaik
2021-11-16 18:54               ` Junio C Hamano
2021-11-17  5:55                 ` Mugdha Pattnaik
2021-11-19 10:56           ` [PATCH v7] " Mugdha Pattnaik via GitGitGadget
2021-08-27  7:51 ` [PATCH] " Bagas Sanjaya
2021-08-27 13:13   ` Mugdha Pattnaik

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=xmqqsfyuajak.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=mugdhapattnaik@gmail.com \
    --cc=raykar.ath@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).