Re: [PATCH v2] submodule: absorb git dir instead of dying on deinit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Atharva Raykar <raykar.ath@xxxxxxxxx> writes:

> "Mugdha Pattnaik via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes:
>
>> From: mugdha <mugdhapattnaik@xxxxxxxxx>
>>
>> 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 ;-)




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux