From 08a3651fe7f3163acbac461e0daf370329a1d332 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?SZEDER=20G=C3=A1bor?= Date: Mon, 30 Nov 2015 12:40:53 +0100 Subject: Make error message after failing commit_lock_file() less confusing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The error message after a failing commit_lock_file() call sometimes looks like this, causing confusion: $ git remote add remote git@server.com/repo.git error: could not commit config file .git/config # Huh?! # I didn't want to commit anything, especially not my config file! While in the narrow context of the lockfile module using the verb 'commit' in the error message makes perfect sense, in the broader context of git the word 'commit' already has a very specific meaning, hence the confusion. Reword these error messages to say "could not write" instead of "could not commit". While at it, include strerror in the error messages after writing the config file or the credential store fails to provide some information about the cause of the failure, and update the style of the error message after writing the reflog fails to match surrounding error messages (i.e. no '' around the pathname and no () around the error description). Signed-off-by: SZEDER Gábor Signed-off-by: Jeff King --- fast-import.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fast-import.c') diff --git a/fast-import.c b/fast-import.c index 6c7c3c9b6..b141535e1 100644 --- a/fast-import.c +++ b/fast-import.c @@ -1821,7 +1821,7 @@ static void dump_marks(void) dump_marks_helper(f, 0, marks); if (commit_lock_file(&mark_lock)) { - failure |= error("Unable to commit marks file %s: %s", + failure |= error("Unable to write file %s: %s", export_marks_file, strerror(errno)); return; } -- cgit v1.2.1