git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>, "Jeff King" <peff@peff.net>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH 0/5] *.[ch]: don't duplicate *_init() and *_INIT logic
Date: Thu,  1 Jul 2021 12:51:24 +0200	[thread overview]
Message-ID: <cover-0.5-00000000000-20210701T104855Z-avarab@gmail.com> (raw)

This series implements a suggestion by Jeff King to use an idiom for
*_init() functions that avoids duplicating what we've declared in the
corresponding *_INIT macros. See
https://lore.kernel.org/git/YNytp0JAIaQih0Y4@coredump.intra.peff.net/

Ævar Arnfjörð Bjarmason (5):
  *.h: move some *_INIT to designated initializers
  *.c *_init(): define in terms of corresponding *_INIT macro
  dir.[ch]: replace dir_init() with DIR_INIT
  string-list.[ch]: add a string_list_init_{nodup,dup}()
  string-list.h users: change to use *_{nodup,dup}()

 apply.c                |  6 +++---
 archive.c              |  2 +-
 builtin/add.c          |  3 +--
 builtin/check-ignore.c |  3 +--
 builtin/clean.c        |  6 ++----
 builtin/grep.c         |  3 +--
 builtin/ls-files.c     |  3 +--
 builtin/stash.c        |  3 +--
 config.c               |  2 +-
 credential.c           |  4 ++--
 credential.h           |  4 +++-
 dir.c                  |  9 ++-------
 dir.h                  |  4 ++--
 entry.c                |  4 ++--
 json-writer.c          |  6 ++----
 json-writer.h          |  5 ++++-
 merge-ort.c            |  4 ++--
 merge-recursive.c      |  4 ++--
 merge.c                |  3 +--
 refs/packed-backend.c  |  2 +-
 run-command.c          |  5 ++---
 run-command.h          |  5 ++++-
 strbuf.c               |  4 ++--
 string-list.c          | 18 ++++++++++++++++--
 string-list.h          | 15 +++++++++++----
 strmap.c               |  3 ++-
 strvec.c               |  5 ++---
 transport.c            |  2 +-
 wt-status.c            |  3 +--
 29 files changed, 76 insertions(+), 64 deletions(-)

-- 
2.32.0.623.ge833f40cd87


             reply	other threads:[~2021-07-01 10:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-01 10:51 Ævar Arnfjörð Bjarmason [this message]
2021-07-01 10:51 ` [PATCH 1/5] *.h: move some *_INIT to designated initializers Ævar Arnfjörð Bjarmason
2021-07-01 15:00   ` Martin Ågren
2021-07-01 15:56     ` Junio C Hamano
2021-07-01 16:08     ` Ævar Arnfjörð Bjarmason
2021-07-01 10:51 ` [PATCH 2/5] *.c *_init(): define in terms of corresponding *_INIT macro Ævar Arnfjörð Bjarmason
2021-07-01 10:51 ` [PATCH 3/5] dir.[ch]: replace dir_init() with DIR_INIT Ævar Arnfjörð Bjarmason
2021-07-01 10:51 ` [PATCH 4/5] string-list.[ch]: add a string_list_init_{nodup,dup}() Ævar Arnfjörð Bjarmason
2021-07-01 10:51 ` [PATCH 5/5] string-list.h users: change to use *_{nodup,dup}() Ævar Arnfjörð Bjarmason
2021-07-01 16:13 ` [PATCH 0/5] *.[ch]: don't duplicate *_init() and *_INIT logic Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover-0.5-00000000000-20210701T104855Z-avarab@gmail.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).