]> git.ipfire.org Git - thirdparty/git.git/commitdiff
refs/files-backend: remove unused open mode parameter
authorRené Scharfe <l.s.r@web.de>
Thu, 9 Sep 2021 21:45:51 +0000 (23:45 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 10 Sep 2021 00:40:28 +0000 (17:40 -0700)
We only need to provide a mode if we are willing to let open(2) create
the file, which is not the case here, so drop the unnecessary parameter.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs/files-backend.c

index 677b7e4cdd2d056f48f700a0bc6301dd91c50beb..74c03858736cc212cad0edf7ab1be42cf577c363 100644 (file)
@@ -1569,7 +1569,7 @@ static int log_ref_setup(struct files_ref_store *refs,
                        goto error;
                }
        } else {
-               *logfd = open(logfile, O_APPEND | O_WRONLY, 0666);
+               *logfd = open(logfile, O_APPEND | O_WRONLY);
                if (*logfd < 0) {
                        if (errno == ENOENT || errno == EISDIR) {
                                /*