From: Lars Hjemli Date: Fri, 6 Apr 2007 08:33:06 +0000 (+0200) Subject: rename_ref(): only print a warning when config-file update fails X-Git-Tag: v1.5.1.1~18 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d26f9fef470443dfb0d09c08341634208f4fb6f7;p=git.git rename_ref(): only print a warning when config-file update fails If git_config_rename_section() fails, rename_ref() used to return 1, which left HEAD pointing to an absent refs/heads file (since the actual renaming had already occurred). Signed-off-by: Lars Hjemli Signed-off-by: Junio C Hamano --- diff --git a/refs.c b/refs.c index f471152bf..2ac638494 100644 --- a/refs.c +++ b/refs.c @@ -835,7 +835,7 @@ int rename_ref(const char *oldref, const char *newref, const char *logmsg) snprintf(oldsection, 1024, "branch.%s", oldref + 11); snprintf(newsection, 1024, "branch.%s", newref + 11); if (git_config_rename_section(oldsection, newsection) < 0) - return 1; + error("unable to update config-file"); } return 0;