From: Danh Doan <congdanhqx@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Derrick Stolee <stolee@gmail.com>
Subject: Re: What's cooking in git.git (Apr 2020, #02; Mon, 20)
Date: Thu, 23 Apr 2020 20:39:37 +0700 [thread overview]
Message-ID: <20200423133937.GA1984@danh.dev> (raw)
In-Reply-To: <xmqq8sipppmt.fsf@gitster.c.googlers.com>
On 2020-04-20 18:57:14-0700, Junio C Hamano <gitster@pobox.com> wrote:
> * ds/blame-on-bloom (2020-04-16) 3 commits
> - blame: use changed-path Bloom filters
> - tests: write commit-graph with Bloom filters
> - revision: complicated pathspecs disable filters
> (this branch uses gs/commit-graph-path-filter.)
>
> "git blame" learns to take advantage of the "changed-paths" Bloom
> filter stored in the commit-graph file.
>
> Will merge to 'next'.
Please apply this patch on top of ds/blame-on-bloom
to fix `make sparse`.
POSIX and (IIRC, C) requires final newline.
Feel free to fix up to current series
------------------8<-----------------------
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Thu, 23 Apr 2020 20:24:50 +0700
Subject: [PATCH] bloom: fix `make sparse` warning
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* We need a `final_new_line` to make our source code as text file, per
POSIX and C specification.
* `bloom_filters` should be limited to interal linkage only
Feel free to fix up to current series
Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
---
bloom.c | 4 ++--
bloom.h | 2 +-
t/helper/test-bloom.c | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/bloom.c b/bloom.c
index dd9bab9bbd..ee025e0c61 100644
--- a/bloom.c
+++ b/bloom.c
@@ -9,7 +9,7 @@
define_commit_slab(bloom_filter_slab, struct bloom_filter);
-struct bloom_filter_slab bloom_filters;
+static struct bloom_filter_slab bloom_filters;
struct pathmap_hash_entry {
struct hashmap_entry entry;
@@ -273,4 +273,4 @@ int bloom_filter_contains(const struct bloom_filter *filter,
}
return 1;
-}
\ No newline at end of file
+}
diff --git a/bloom.h b/bloom.h
index b935186425..e0e59e0754 100644
--- a/bloom.h
+++ b/bloom.h
@@ -87,4 +87,4 @@ int bloom_filter_contains(const struct bloom_filter *filter,
const struct bloom_key *key,
const struct bloom_filter_settings *settings);
-#endif
\ No newline at end of file
+#endif
diff --git a/t/helper/test-bloom.c b/t/helper/test-bloom.c
index ce412664ba..ce5a0af5ae 100644
--- a/t/helper/test-bloom.c
+++ b/t/helper/test-bloom.c
@@ -3,7 +3,7 @@
#include "test-tool.h"
#include "commit.h"
-struct bloom_filter_settings settings = DEFAULT_BLOOM_FILTER_SETTINGS;
+static struct bloom_filter_settings settings = DEFAULT_BLOOM_FILTER_SETTINGS;
static void add_string_to_filter(const char *data, struct bloom_filter *filter) {
struct bloom_key key;
@@ -78,4 +78,4 @@ int cmd__bloom(int argc, const char **argv)
}
return 0;
-}
\ No newline at end of file
+}
--
2.26.2.384.g435bf60bd5
Danh
prev parent reply other threads:[~2020-04-23 13:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-21 1:57 What's cooking in git.git (Apr 2020, #02; Mon, 20) Junio C Hamano
2020-04-21 13:06 ` Philippe Blain
2020-04-21 15:08 ` Damien Robert
2020-04-23 13:39 ` Danh Doan [this message]
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=20200423133937.GA1984@danh.dev \
--to=congdanhqx@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=stolee@gmail.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
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).