config.c: rename label unlock_and_out
There are two ways to unlock a file: commit, or revert. Rename it to commit_and_out to avoid confusion. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
29647d79a9
commit
6e45b43fa9
4
config.c
4
config.c
@ -2329,7 +2329,7 @@ int git_config_rename_section_in_file(const char *config_filename,
|
|||||||
|
|
||||||
if (!(config_file = fopen(config_filename, "rb"))) {
|
if (!(config_file = fopen(config_filename, "rb"))) {
|
||||||
/* no config file means nothing to rename, no error */
|
/* no config file means nothing to rename, no error */
|
||||||
goto unlock_and_out;
|
goto commit_and_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fstat(fileno(config_file), &st) == -1) {
|
if (fstat(fileno(config_file), &st) == -1) {
|
||||||
@ -2391,7 +2391,7 @@ int git_config_rename_section_in_file(const char *config_filename,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
fclose(config_file);
|
fclose(config_file);
|
||||||
unlock_and_out:
|
commit_and_out:
|
||||||
if (commit_lock_file(lock) < 0)
|
if (commit_lock_file(lock) < 0)
|
||||||
ret = error_errno("could not write config file %s",
|
ret = error_errno("could not write config file %s",
|
||||||
config_filename);
|
config_filename);
|
||||||
|
Loading…
Reference in New Issue
Block a user