Re: [PATCH 2/6] submodule--helper: return error from set-url when modifying failed
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 3, 2023, 23:10 UTC
- Message-ID
- <xmqqsf6ruwse.fsf@gitster.g>
- In-Reply-To
- <20231003185047.2697995-2-heftig@archlinux.org>
"Jan Alexander Steffens (heftig)" <heftig@archlinux.org> writes:
> set-branch will return an error when setting the config fails so I don't > see why set-url shouldn't. Also skip the sync in this case.
Two other failures in this helper function gives end-user readable message (parameter errors are greeted with usage, giving wrong path is greeted with a die()), but this new error condition will silently die unless config_set_in_gitmodules_file_gently() complains.
I wonder if we should give an error message in this case, too.
In any case, not calling sync after failed set_in_gitmodules is a sensible design decision.