diff options
author | Junio C Hamano <junkio@cox.net> | 2007-04-05 16:34:51 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-04-05 16:34:51 -0700 |
commit | 77e6f5bc1009aa588a3b2235758bf5be13b23d85 (patch) | |
tree | cb040ac72459291eda6adf1aa9f10778bc54cdbf /config.c | |
parent | 33580fbd308593e36395926fd35b501976ad322a (diff) | |
parent | b5da24679ec73f458988523dce9dd17b4e9b0e02 (diff) | |
download | git-77e6f5bc1009aa588a3b2235758bf5be13b23d85.tar.gz |
Merge branch 'maint'
* maint:
Fix lseek(2) calls with args 2 and 3 swapped
Honor -p<n> when applying git diffs
Fix dependency of common-cmds.h
Fix renaming branch without config file
DESTDIR support for git/contrib/emacs
gitweb: Fix bug in "blobdiff" view for split (e.g. file to symlink) patches
Document --left-right option to rev-list.
Revert "builtin-archive: use RUN_SETUP"
rename contrib/hooks/post-receieve-email to contrib/hooks/post-receive-email.
rerere: make sorting really stable.
Fix t4200-rerere for white-space from "wc -l"
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -916,8 +916,8 @@ int git_config_rename_section(const char *old_name, const char *new_name) } if (!(config_file = fopen(config_filename, "rb"))) { - ret = error("Could not open config file!"); - goto out; + /* no config file means nothing to rename, no error */ + goto unlock_and_out; } while (fgets(buf, sizeof(buf), config_file)) { @@ -951,6 +951,7 @@ int git_config_rename_section(const char *old_name, const char *new_name) } } fclose(config_file); + unlock_and_out: if (close(out_fd) || commit_lock_file(lock) < 0) ret = error("Cannot commit config file!"); out: |