]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin-revert.c
Enhance hold_lock_file_for_{update,append}() API
[thirdparty/git.git] / builtin-revert.c
index e9da870d22c14c32a0e0a6cb71b933c79a2d8b53..e839387629461be24c0bf1dacaa3cdb48cb2a5f4 100644 (file)
@@ -180,7 +180,7 @@ static void set_author_ident_env(const char *message)
                        email++;
                        timestamp = strchr(email, '>');
                        if (!timestamp)
-                               die ("Could not extract author email from %s",
+                               die ("Could not extract author time from %s",
                                        sha1_to_hex(commit->object.sha1));
                        *timestamp = '\0';
                        for (timestamp++; *timestamp && isspace(*timestamp);
@@ -338,7 +338,8 @@ static int revert_or_cherry_pick(int argc, const char **argv)
         * reverse of it if we are revert.
         */
 
-       msg_fd = hold_lock_file_for_update(&msg_file, defmsg, 1);
+       msg_fd = hold_lock_file_for_update(&msg_file, defmsg,
+                                          LOCK_DIE_ON_ERROR);
 
        encoding = get_encoding(message);
        if (!encoding)