Re: [PATCH 5/5] parse-remote: remove this now-unused library
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 11, 2020, 16:33 UTC
- Message-ID
- <xmqqwnyr4zv8.fsf@gitster.c.googlers.com>
- In-Reply-To
- <20201111151754.31527-6-avarab@gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 7 quoted lines
> Completely remove the git-parse-remote shellscript library.
>
> Since e9460a66e0 ("parse-remote: support default reflist in
> get_remote_merge_branch", 2009-06-12) when there were around 300 lines
> of code here used by various core code everything in it has become
> unsued, and that unused code was removed in preceding commits. Almost
> all of its previous functionality has now been rewritten in C.Very pleasing to see this.
I would imagine that an equally easy to understand and more compact presentation of this series would have been to
- copy minimally needed code to git-submodule.sh verbatim, while dropping the dot-source from git-submodule.sh (patch 1)
- just say "nobody now dot-sources this shell library" and do what this step does.
Especially 1/5 confused me more than it helped me to understand the end result ;-) It does not matter in the endgame that GIT_DIR was defined there, as long as we know nobody other than git-submodule.sh dot-sources the shell library and git-submodule.sh uses its own setup.
But that can only be said with perfect hindsight after seeing all your efforts in these five patches.
Thanks.