summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2016-12-20 16:48:35 +0700
committerJunio C Hamano <gitster@pobox.com>2016-12-20 12:08:06 -0800
commit6e45b43fa9c17124c5aea03b3fd6563cf03bae07 (patch)
treed747e4ef2cdd7f407aee1f5467af9f818df10b9c
parent29647d79a9a29498675ccb137f567a44dc9628b8 (diff)
downloadgit-6e45b43fa9c17124c5aea03b3fd6563cf03bae07.tar.gz
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>
-rw-r--r--config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/config.c b/config.c
index 19ceb2639e..8065296a11 100644
--- a/config.c
+++ b/config.c
@@ -2329,7 +2329,7 @@ int git_config_rename_section_in_file(const char *config_filename,
if (!(config_file = fopen(config_filename, "rb"))) {
/* no config file means nothing to rename, no error */
- goto unlock_and_out;
+ goto commit_and_out;
}
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);
-unlock_and_out:
+commit_and_out:
if (commit_lock_file(lock) < 0)
ret = error_errno("could not write config file %s",
config_filename);