@@ -241,18 +241,18 @@ static int write_message(const void *buf, size_t len, const char *filename,
241
241
242
242
int msg_fd = hold_lock_file_for_update (& msg_file , filename , 0 );
243
243
if (msg_fd < 0 )
244
- return error_errno (_ ("Could not lock '%s'" ), filename );
244
+ return error_errno (_ ("could not lock '%s'" ), filename );
245
245
if (write_in_full (msg_fd , buf , len ) < 0 ) {
246
246
rollback_lock_file (& msg_file );
247
- return error_errno (_ ("Could not write to '%s'" ), filename );
247
+ return error_errno (_ ("could not write to '%s'" ), filename );
248
248
}
249
249
if (append_eol && write (msg_fd , "\n" , 1 ) < 0 ) {
250
250
rollback_lock_file (& msg_file );
251
- return error_errno (_ ("Could not write eol to '%s" ), filename );
251
+ return error_errno (_ ("could not write eol to '%s" ), filename );
252
252
}
253
253
if (commit_lock_file (& msg_file ) < 0 ) {
254
254
rollback_lock_file (& msg_file );
255
- return error (_ ("Error wrapping up '%s'." ), filename );
255
+ return error (_ ("failed to finalize '%s'." ), filename );
256
256
}
257
257
258
258
return 0 ;
@@ -302,11 +302,11 @@ static int error_dirty_index(struct replay_opts *opts)
302
302
if (read_cache_unmerged ())
303
303
return error_resolve_conflict (_ (action_name (opts )));
304
304
305
- error (_ ("Your local changes would be overwritten by %s." ),
305
+ error (_ ("your local changes would be overwritten by %s." ),
306
306
_ (action_name (opts )));
307
307
308
308
if (advice_commit_before_merge )
309
- advise (_ ("Commit your changes or stash them to proceed." ));
309
+ advise (_ ("commit your changes or stash them to proceed." ));
310
310
return -1 ;
311
311
}
312
312
@@ -415,7 +415,7 @@ static int is_index_unchanged(void)
415
415
struct commit * head_commit ;
416
416
417
417
if (!resolve_ref_unsafe ("HEAD" , RESOLVE_REF_READING , head_sha1 , NULL ))
418
- return error (_ ("Could not resolve HEAD commit\n" ));
418
+ return error (_ ("could not resolve HEAD commit\n" ));
419
419
420
420
head_commit = lookup_commit (head_sha1 );
421
421
@@ -435,7 +435,7 @@ static int is_index_unchanged(void)
435
435
436
436
if (!cache_tree_fully_valid (active_cache_tree ))
437
437
if (cache_tree_update (& the_index , 0 ))
438
- return error (_ ("Unable to update cache tree\n" ));
438
+ return error (_ ("unable to update cache tree\n" ));
439
439
440
440
return !hashcmp (active_cache_tree -> sha1 , head_commit -> tree -> object .oid .hash );
441
441
}
@@ -505,7 +505,7 @@ static int run_git_commit(const char *defmsg, struct replay_opts *opts,
505
505
if (!env ) {
506
506
const char * gpg_opt = gpg_sign_opt_quoted (opts );
507
507
508
- return error ("You have staged changes in your working "
508
+ return error ("you have staged changes in your working "
509
509
"tree. If these changes are meant to be\n"
510
510
"squashed into the previous commit, run:\n\n"
511
511
" git commit --amend %s\n\n"
@@ -558,12 +558,12 @@ static int is_original_commit_empty(struct commit *commit)
558
558
const unsigned char * ptree_sha1 ;
559
559
560
560
if (parse_commit (commit ))
561
- return error (_ ("Could not parse commit %s\n" ),
561
+ return error (_ ("could not parse commit %s\n" ),
562
562
oid_to_hex (& commit -> object .oid ));
563
563
if (commit -> parents ) {
564
564
struct commit * parent = commit -> parents -> item ;
565
565
if (parse_commit (parent ))
566
- return error (_ ("Could not parse parent commit %s\n" ),
566
+ return error (_ ("could not parse parent commit %s\n" ),
567
567
oid_to_hex (& parent -> object .oid ));
568
568
ptree_sha1 = parent -> tree -> object .oid .hash ;
569
569
} else {
@@ -647,7 +647,7 @@ static int do_pick_commit(enum todo_command command, struct commit *commit,
647
647
* to work on.
648
648
*/
649
649
if (write_cache_as_tree (head , 0 , NULL ))
650
- return error (_ ("Your index file is unmerged." ));
650
+ return error (_ ("your index file is unmerged." ));
651
651
} else {
652
652
unborn = get_sha1 ("HEAD" , head );
653
653
if (unborn )
@@ -666,19 +666,19 @@ static int do_pick_commit(enum todo_command command, struct commit *commit,
666
666
struct commit_list * p ;
667
667
668
668
if (!opts -> mainline )
669
- return error (_ ("Commit %s is a merge but no -m option was given." ),
669
+ return error (_ ("commit %s is a merge but no -m option was given." ),
670
670
oid_to_hex (& commit -> object .oid ));
671
671
672
672
for (cnt = 1 , p = commit -> parents ;
673
673
cnt != opts -> mainline && p ;
674
674
cnt ++ )
675
675
p = p -> next ;
676
676
if (cnt != opts -> mainline || !p )
677
- return error (_ ("Commit %s does not have parent %d" ),
677
+ return error (_ ("commit %s does not have parent %d" ),
678
678
oid_to_hex (& commit -> object .oid ), opts -> mainline );
679
679
parent = p -> item ;
680
680
} else if (0 < opts -> mainline )
681
- return error (_ ("Mainline was specified but commit %s is not a merge." ),
681
+ return error (_ ("mainline was specified but commit %s is not a merge." ),
682
682
oid_to_hex (& commit -> object .oid ));
683
683
else
684
684
parent = commit -> parents -> item ;
@@ -696,7 +696,7 @@ static int do_pick_commit(enum todo_command command, struct commit *commit,
696
696
oid_to_hex (& parent -> object .oid ));
697
697
698
698
if (get_message (commit , & msg ) != 0 )
699
- return error (_ ("Cannot get commit message for %s" ),
699
+ return error (_ ("cannot get commit message for %s" ),
700
700
oid_to_hex (& commit -> object .oid ));
701
701
702
702
/*
@@ -935,13 +935,13 @@ static int parse_insn_buffer(char *buf, struct todo_list *todo_list)
935
935
item = append_new_todo (todo_list );
936
936
item -> offset_in_buf = p - todo_list -> buf .buf ;
937
937
if (parse_insn_line (item , p , eol )) {
938
- res = error (_ ("Invalid line %d: %.*s" ),
938
+ res = error (_ ("invalid line %d: %.*s" ),
939
939
i , (int )(eol - p ), p );
940
940
item -> command = -1 ;
941
941
}
942
942
}
943
943
if (!todo_list -> nr )
944
- return error (_ ("No commits parsed." ));
944
+ return error (_ ("no commits parsed." ));
945
945
return res ;
946
946
}
947
947
@@ -954,16 +954,16 @@ static int read_populate_todo(struct todo_list *todo_list,
954
954
strbuf_reset (& todo_list -> buf );
955
955
fd = open (todo_file , O_RDONLY );
956
956
if (fd < 0 )
957
- return error_errno (_ ("Could not open '%s'" ), todo_file );
957
+ return error_errno (_ ("could not open '%s'" ), todo_file );
958
958
if (strbuf_read (& todo_list -> buf , fd , 0 ) < 0 ) {
959
959
close (fd );
960
- return error (_ ("Could not read '%s'." ), todo_file );
960
+ return error (_ ("could not read '%s'." ), todo_file );
961
961
}
962
962
close (fd );
963
963
964
964
res = parse_insn_buffer (todo_list -> buf .buf , todo_list );
965
965
if (res )
966
- return error (_ ("Unusable instruction sheet: '%s'" ), todo_file );
966
+ return error (_ ("unusable instruction sheet: '%s'" ), todo_file );
967
967
968
968
if (!is_rebase_i (opts )) {
969
969
enum todo_command valid =
@@ -974,9 +974,9 @@ static int read_populate_todo(struct todo_list *todo_list,
974
974
if (valid == todo_list -> items [i ].command )
975
975
continue ;
976
976
else if (valid == TODO_PICK )
977
- return error (_ ("Cannot cherry-pick during a revert." ));
977
+ return error (_ ("cannot cherry-pick during a revert." ));
978
978
else
979
- return error (_ ("Cannot revert during a cherry-pick." ));
979
+ return error (_ ("cannot revert during a cherry-pick." ));
980
980
}
981
981
982
982
return 0 ;
@@ -1019,10 +1019,10 @@ static int populate_opts_cb(const char *key, const char *value, void *data)
1019
1019
ALLOC_GROW (opts -> xopts , opts -> xopts_nr + 1 , opts -> xopts_alloc );
1020
1020
opts -> xopts [opts -> xopts_nr ++ ] = xstrdup (value );
1021
1021
} else
1022
- return error (_ ("Invalid key: %s" ), key );
1022
+ return error (_ ("invalid key: %s" ), key );
1023
1023
1024
1024
if (!error_flag )
1025
- return error (_ ("Invalid value for %s: %s" ), key , value );
1025
+ return error (_ ("invalid value for %s: %s" ), key , value );
1026
1026
1027
1027
return 0 ;
1028
1028
}
@@ -1054,7 +1054,7 @@ static int read_populate_opts(struct replay_opts *opts)
1054
1054
* are pretty certain that it is syntactically correct.
1055
1055
*/
1056
1056
if (git_config_from_file (populate_opts_cb , git_path_opts_file (), opts ) < 0 )
1057
- return error (_ ("Malformed options sheet: '%s'" ),
1057
+ return error (_ ("malformed options sheet: '%s'" ),
1058
1058
git_path_opts_file ());
1059
1059
return 0 ;
1060
1060
}
@@ -1097,7 +1097,7 @@ static int create_seq_dir(void)
1097
1097
return -1 ;
1098
1098
}
1099
1099
else if (mkdir (git_path_seq_dir (), 0777 ) < 0 )
1100
- return error_errno (_ ("Could not create sequencer directory '%s'" ),
1100
+ return error_errno (_ ("could not create sequencer directory '%s'" ),
1101
1101
git_path_seq_dir ());
1102
1102
return 0 ;
1103
1103
}
@@ -1111,17 +1111,17 @@ static int save_head(const char *head)
1111
1111
fd = hold_lock_file_for_update (& head_lock , git_path_head_file (), 0 );
1112
1112
if (fd < 0 ) {
1113
1113
rollback_lock_file (& head_lock );
1114
- return error_errno (_ ("Could not lock HEAD" ));
1114
+ return error_errno (_ ("could not lock HEAD" ));
1115
1115
}
1116
1116
strbuf_addf (& buf , "%s\n" , head );
1117
1117
if (write_in_full (fd , buf .buf , buf .len ) < 0 ) {
1118
1118
rollback_lock_file (& head_lock );
1119
- return error_errno (_ ("Could not write to '%s'" ),
1119
+ return error_errno (_ ("could not write to '%s'" ),
1120
1120
git_path_head_file ());
1121
1121
}
1122
1122
if (commit_lock_file (& head_lock ) < 0 ) {
1123
1123
rollback_lock_file (& head_lock );
1124
- return error (_ ("Error wrapping up '%s'." ), git_path_head_file ());
1124
+ return error (_ ("failed to finalize '%s'." ), git_path_head_file ());
1125
1125
}
1126
1126
return 0 ;
1127
1127
}
@@ -1200,14 +1200,14 @@ static int save_todo(struct todo_list *todo_list, struct replay_opts *opts)
1200
1200
1201
1201
fd = hold_lock_file_for_update (& todo_lock , todo_path , 0 );
1202
1202
if (fd < 0 )
1203
- return error_errno (_ ("Could not lock '%s'" ), todo_path );
1203
+ return error_errno (_ ("could not lock '%s'" ), todo_path );
1204
1204
offset = next < todo_list -> nr ?
1205
1205
todo_list -> items [next ].offset_in_buf : todo_list -> buf .len ;
1206
1206
if (write_in_full (fd , todo_list -> buf .buf + offset ,
1207
1207
todo_list -> buf .len - offset ) < 0 )
1208
- return error_errno (_ ("Could not write to '%s'" ), todo_path );
1208
+ return error_errno (_ ("could not write to '%s'" ), todo_path );
1209
1209
if (commit_lock_file (& todo_lock ) < 0 )
1210
- return error (_ ("Error wrapping up '%s'." ), todo_path );
1210
+ return error (_ ("failed to finalize '%s'." ), todo_path );
1211
1211
return 0 ;
1212
1212
}
1213
1213
@@ -1382,7 +1382,7 @@ int sequencer_pick_revisions(struct replay_opts *opts)
1382
1382
create_seq_dir () < 0 )
1383
1383
return -1 ;
1384
1384
if (get_sha1 ("HEAD" , sha1 ) && (opts -> action == REPLAY_REVERT ))
1385
- return error (_ ("Can 't revert as initial commit" ));
1385
+ return error (_ ("can 't revert as initial commit" ));
1386
1386
if (save_head (sha1_to_hex (sha1 )))
1387
1387
return -1 ;
1388
1388
if (save_opts (opts ))
0 commit comments