git@vger.kernel.org mailing list mirror (one of many)
 help / Atom feed
From: Stefan Beller <sbeller@google.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com, Stefan Beller <sbeller@google.com>
Subject: [PATCH 00/10] Friday night special: hash map cleanup
Date: Fri, 30 Jun 2017 17:28:28 -0700
Message-ID: <20170701002838.22785-1-sbeller@google.com> (raw)

This goes on top of sb/hashmap-customize-comparison.
No functional impact but a pure cleanup series:
No casts to hashmap_cmp_fn in the whole code base any more.

This revealed another interesting thing, which is not a bug per se:
The const correctness of hashmap_cmp_fn as it requires all its void
pointers to be const!

We violate this in patch-ids.c as we modify the `fndata` at some
uncritical part (a part that doesn't change the equal-functionality
AFAICT).

Thanks,
Stefan

Stefan Beller (10):
  attr.c: drop hashmap_cmp_fn cast
  builtin/difftool.c: drop hashmap_cmp_fn cast
  builtin/describe: drop hashmap_cmp_fn cast
  config.c: drop hashmap_cmp_fn cast
  convert/sub-process: drop cast to hashmap_cmp_fn
  patch-ids.c: drop hashmap_cmp_fn cast
  remote.c: drop hashmap_cmp_fn cast
  submodule-config.c: drop hashmap_cmp_fn cast
  name-hash.c: drop hashmap_cmp_fn cast
  t/helper/test-hashmap: use custom data instead of duplicate cmp
    functions

 attr.c                  | 12 +++++++-----
 builtin/describe.c      |  9 ++++++---
 builtin/difftool.c      | 37 ++++++++++++++++++++++---------------
 config.c                | 10 ++++++----
 convert.c               |  3 +--
 name-hash.c             | 22 +++++++++++++---------
 patch-ids.c             | 14 +++++++++-----
 remote.c                | 12 ++++++++----
 sub-process.c           |  7 +++++--
 sub-process.h           |  4 ++--
 submodule-config.c      | 18 ++++++++++++------
 t/helper/test-hashmap.c | 34 ++++++++++++++++------------------
 12 files changed, 107 insertions(+), 75 deletions(-)

-- 
2.13.0.31.g9b732c453e


             reply index

Thread overview: 12+ messages in thread (expand / mbox.gz / Atom feed / [top])
2017-07-01  0:28 Stefan Beller [this message]
2017-07-01  0:28 ` [PATCH 01/10] attr.c: drop hashmap_cmp_fn cast Stefan Beller
2017-07-01  0:28 ` [PATCH 02/10] builtin/difftool.c: " Stefan Beller
2017-07-01  0:28 ` [PATCH 03/10] builtin/describe: " Stefan Beller
2017-07-01  0:28 ` [PATCH 04/10] config.c: " Stefan Beller
2017-07-01  0:28 ` [PATCH 05/10] convert/sub-process: drop cast to hashmap_cmp_fn Stefan Beller
2017-07-01  0:28 ` [PATCH 06/10] patch-ids.c: drop hashmap_cmp_fn cast Stefan Beller
2017-07-01  0:28 ` [PATCH 07/10] remote.c: " Stefan Beller
2017-07-01  0:28 ` [PATCH 08/10] submodule-config.c: " Stefan Beller
2017-07-01  0:28 ` [PATCH 09/10] name-hash.c: " Stefan Beller
2017-07-01  0:28 ` [PATCH 10/10] t/helper/test-hashmap: use custom data instead of duplicate cmp functions Stefan Beller
2017-07-05 20:51 ` [PATCH 00/10] Friday night special: hash map cleanup Junio C Hamano

Reply instructions:

You may reply publically 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 to all the recipients using the --to, --cc,
  and --in-reply-to switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170701002838.22785-1-sbeller@google.com \
    --to=sbeller@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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

git@vger.kernel.org mailing list mirror (one of many)

Archives are clonable:
	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.org/gmane.comp.version-control.git

 note: .onion URLs require Tor: https://www.torproject.org/
       or Tor2web: https://www.tor2web.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox