]> git.ipfire.org Git - thirdparty/git.git/commit - csum-file.c
use xopen() to handle fatal open(2) failures
authorRené Scharfe <l.s.r@web.de>
Wed, 25 Aug 2021 20:16:46 +0000 (22:16 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 25 Aug 2021 21:39:08 +0000 (14:39 -0700)
commit66e905b7dd0f4e9dd576be681f30fbaeeb19ec4a
tree4cff22e9d61be87fc5bce6952981e8ba1c7b7127
parenta7439d0f9dd291e7cc9e6c2dda19cbfdf09b62ee
use xopen() to handle fatal open(2) failures

Add and apply a semantic patch for using xopen() instead of calling
open(2) and die() or die_errno() explicitly.  This makes the error
messages more consistent and shortens the code.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 files changed:
builtin/add.c
builtin/archive.c
builtin/bugreport.c
builtin/commit-tree.c
builtin/hash-object.c
builtin/index-pack.c
builtin/mailsplit.c
builtin/merge.c
builtin/notes.c
builtin/tag.c
builtin/update-index.c
contrib/coccinelle/xopen.cocci [new file with mode: 0644]
csum-file.c
pack-write.c
run-command.c