]> git.ipfire.org Git - thirdparty/git.git/commit - git-submodule.sh
submodule: remove unnecessary `prefix` based option logic
authorKaartic Sivaraam <kaartic.sivaraam@gmail.com>
Tue, 22 Jun 2021 18:14:52 +0000 (23:44 +0530)
committerJunio C Hamano <gitster@pobox.com>
Tue, 29 Jun 2021 03:28:19 +0000 (20:28 -0700)
commit1cf823d8f000e2c85a5cae9674cf38c1503f214d
tree9cca1dab7099aa942b31c66c80eb76fab51de0a9
parentebf3c04b262aa27fbb97f8a0156c2347fecafafb
submodule: remove unnecessary `prefix` based option logic

Over time when parts of submodule have been ported from shell to
builtin, many instances of the submodule helper have been added.
Also added with them are some unnecessary option passing
logic that are based on the `prefix` shell variable which never
gets set in their code flows.

On analysis, the only shell functions which have a valid usage
for the `prefix` shell variable are:

    - cmd_update: which is the only function which sets the variable
      and thus uses it properly

    - cmd_init: which uses the variable via a call from cmd_update

So, remove the unnecessary option parsing logic based on the `prefix`
shell variable.

Signed-off-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-submodule.sh