From: Phillip Wood via GitGitGadget Date: Wed, 11 Sep 2024 15:18:35 GMT Subject: [PATCH 2/4] remote: print an error if refspec cannot be removed Message-ID: In-Reply-To: From: Phillip Wood If the existing fetch refspecs cannot be removed when replacing the set of branches to fetch with "git remote set-branches" the command silently fails. Add an error message to tell the user what when wrong. Signed-off-by: Phillip Wood --- builtin/remote.c | 1 + 1 file changed, 1 insertion(+) diff --git a/builtin/remote.c b/builtin/remote.c index 794396ba02f..4dbf7a4c506 100644 --- a/builtin/remote.c +++ b/builtin/remote.c @@ -1603,6 +1603,7 @@ static int set_remote_branches(const char *remotename, const char **branches, } if (!add_mode && remove_all_fetch_refspecs(key.buf)) { + error(_("could not remove existing fetch refspec")); strbuf_release(&key); return 1; } -- gitgitgadget