Skip to content

Commit a8dfe40

Browse files
committed
remote: print an error if refspec cannot be removed
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 <[email protected]>
1 parent d95a07a commit a8dfe40

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

builtin/remote.c

+1
Original file line numberDiff line numberDiff line change
@@ -1603,6 +1603,7 @@ static int set_remote_branches(const char *remotename, const char **branches,
16031603
}
16041604

16051605
if (!add_mode && remove_all_fetch_refspecs(key.buf)) {
1606+
error(_("could not remove existing fetch refspec"));
16061607
strbuf_release(&key);
16071608
return 1;
16081609
}

0 commit comments

Comments
 (0)