Add and use error_errno() and warning_errno()
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest41 patches 0 repliesNew
- v241 patches 8 repliesSuperseded
- v141 patches 11 repliesSuperseded
Patches in v3 No applies recorded yet
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [PATCH v3 00/41] Add and use error_errno() and warning_errno()
Code changes compared to v2 is below (one incorrect conversion reverted, two error message improvements). Other changes are text in these commits, not shown as diff in this mail:
[06/41] builtin/fetch.c: use error_errno()
[08/41] builtin/mailsplit.c: use error_errno()
[09/41] builtin/merge-file.c: use error_errno()
[11/41] builtin/rm.c: use warning_errno()
[14/41] builtin/worktree.c: use error_errno()
[27/41] grep.c: use error_errno()
I didn't mention string format changes (e.g. from "abc (error)" to "abc: error") in the commit messages though.
builtin/pack-objects.c +1 -1
@@ -2018,7 +2018,7 @@ static void ll_find_deltas(struct object_entry **list, unsigned list_size, ret =pthread_create (&p[i].thread,NULL , threaded_find_deltas, &p[i]);if (ret) -die_errno ("unable to create thread" ); +die ("unable to create thread: %s" ,strerror (ret)); active_threads++; }
builtin/rm.c +1 -1
@@ -152,7 +152,7 @@ static int check_local_mod(unsigned char *head, int index_only)if (lstat (ce->name, &st) <0 ) {if (errno !=ENOENT && errno !=ENOTDIR ) -warning_errno ("'%s'" , ce->name); +warning_errno (_ ("failed to stat '%s'" ), ce->name);/* It already vanished from the working tree */ continue ; }
grep.c +1 -1
@@ -1732,7 +1732,7 @@ static int grep_source_load_file(struct grep_source *gs)if (lstat (filename, &st) <0 ) { err_ret:if (errno !=ENOENT ) -error_errno ("'%s'" , filename); +error_errno (_ ("failed to stat '%s'" ), filename);return -1 ; }if (!S_ISREG (st.st_mode))