From: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
josharian@gmail.com, "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: [PATCH 1/2] config.c: rename label unlock_and_out
Date: Tue, 20 Dec 2016 16:48:35 +0700 [thread overview]
Message-ID: <20161220094836.4131-1-pclouds@gmail.com> (raw)
In-Reply-To: <20161220094746.GA3917@ash>
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>
---
config.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/config.c b/config.c
index 4973256..505e0d0 100644
--- a/config.c
+++ b/config.c
@@ -2416,7 +2416,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) {
@@ -2478,7 +2478,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);
--
2.8.2.524.g6ff3d78
next prev parent reply other threads:[~2016-12-20 9:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-16 18:41 Segfault in git_config_set_multivar_in_file_gently with direct_io in FUSE filesystem Josh Bleecher Snyder
2016-12-19 9:21 ` [PATCH] config.c: handle error case for fstat() calls Nguyễn Thái Ngọc Duy
2016-12-19 18:14 ` Junio C Hamano
2016-12-20 9:47 ` Duy Nguyen
2016-12-20 9:48 ` Nguyễn Thái Ngọc Duy [this message]
2016-12-20 9:48 ` [PATCH 2/2] config.c: handle lock file in error case in git_config_rename_ Nguyễn Thái Ngọc Duy
2016-12-20 20:09 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161220094836.4131-1-pclouds@gmail.com \
--to=pclouds@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=josharian@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).