diff options
author | Lars Hjemli <hjemli@gmail.com> | 2007-04-06 10:33:06 +0200 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-04-06 16:54:37 -0700 |
commit | d26f9fef470443dfb0d09c08341634208f4fb6f7 (patch) | |
tree | b0efe2652bc5647891ace0c8f28a5f40da7655c3 /refs.c | |
parent | 08b984fb5456c23b04c573f9021141ce27af707d (diff) | |
download | git-d26f9fef470443dfb0d09c08341634208f4fb6f7.tar.gz git-d26f9fef470443dfb0d09c08341634208f4fb6f7.tar.xz |
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 <hjemli@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'refs.c')
-rw-r--r-- | refs.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |