From: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
To: git@vger.kernel.org
Cc: "Stefan Beller" <sbeller@google.com>,
"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: [PATCH 03/19] list-objects-filter.c: remove implicit dependency on the_index
Date: Fri, 19 Oct 2018 16:52:21 +0200 [thread overview]
Message-ID: <20181019145237.16079-4-pclouds@gmail.com> (raw)
In-Reply-To: <20181019145237.16079-1-pclouds@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
list-objects-filter.c | 7 +++++--
list-objects-filter.h | 1 +
list-objects.c | 3 +++
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/list-objects-filter.c b/list-objects-filter.c
index a0ba78b20c..8825e2a5ab 100644
--- a/list-objects-filter.c
+++ b/list-objects-filter.c
@@ -38,6 +38,7 @@ static enum list_objects_filter_result filter_blobs_none(
struct object *obj,
const char *pathname,
const char *filename,
+ struct index_state *istate,
void *filter_data_)
{
struct filter_blobs_none_data *filter_data = filter_data_;
@@ -94,6 +95,7 @@ static enum list_objects_filter_result filter_blobs_limit(
struct object *obj,
const char *pathname,
const char *filename,
+ struct index_state *istate,
void *filter_data_)
{
struct filter_blobs_limit_data *filter_data = filter_data_;
@@ -200,6 +202,7 @@ static enum list_objects_filter_result filter_sparse(
struct object *obj,
const char *pathname,
const char *filename,
+ struct index_state *istate,
void *filter_data_)
{
struct filter_sparse_data *filter_data = filter_data_;
@@ -216,7 +219,7 @@ static enum list_objects_filter_result filter_sparse(
dtype = DT_DIR;
val = is_excluded_from_list(pathname, strlen(pathname),
filename, &dtype, &filter_data->el,
- &the_index);
+ istate);
if (val < 0)
val = filter_data->array_frame[filter_data->nr].defval;
@@ -279,7 +282,7 @@ static enum list_objects_filter_result filter_sparse(
dtype = DT_REG;
val = is_excluded_from_list(pathname, strlen(pathname),
filename, &dtype, &filter_data->el,
- &the_index);
+ istate);
if (val < 0)
val = frame->defval;
if (val > 0) {
diff --git a/list-objects-filter.h b/list-objects-filter.h
index a6f6b4990b..dfa29595d1 100644
--- a/list-objects-filter.h
+++ b/list-objects-filter.h
@@ -58,6 +58,7 @@ typedef enum list_objects_filter_result (*filter_object_fn)(
struct object *obj,
const char *pathname,
const char *filename,
+ struct index_state *istate,
void *filter_data);
typedef void (*filter_free_fn)(void *filter_data);
diff --git a/list-objects.c b/list-objects.c
index 0c2989d5ca..f9d36dabf2 100644
--- a/list-objects.c
+++ b/list-objects.c
@@ -51,6 +51,7 @@ static void process_blob(struct rev_info *revs,
if (!(obj->flags & USER_GIVEN) && filter_fn)
r = filter_fn(LOFS_BLOB, obj,
path->buf, &path->buf[pathlen],
+ &the_index,
filter_data);
if (r & LOFR_MARK_SEEN)
obj->flags |= SEEN;
@@ -136,6 +137,7 @@ static void process_tree(struct rev_info *revs,
if (!(obj->flags & USER_GIVEN) && filter_fn)
r = filter_fn(LOFS_BEGIN_TREE, obj,
base->buf, &base->buf[baselen],
+ &the_index,
filter_data);
if (r & LOFR_MARK_SEEN)
obj->flags |= SEEN;
@@ -175,6 +177,7 @@ static void process_tree(struct rev_info *revs,
if (!(obj->flags & USER_GIVEN) && filter_fn) {
r = filter_fn(LOFS_END_TREE, obj,
base->buf, &base->buf[baselen],
+ &the_index,
filter_data);
if (r & LOFR_MARK_SEEN)
obj->flags |= SEEN;
--
2.19.1.647.g708186aaf9
next prev parent reply other threads:[~2018-10-19 14:52 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-19 14:52 [PATCH/WIP 00/19] Kill the_index, final part Nguyễn Thái Ngọc Duy
2018-10-19 14:52 ` [PATCH 01/19] wt-status.c: remove implicit dependency on the_index Nguyễn Thái Ngọc Duy
2018-10-19 14:52 ` [PATCH 02/19] wt-status.c: remove implicit dependency the_repository Nguyễn Thái Ngọc Duy
2018-10-19 14:52 ` Nguyễn Thái Ngọc Duy [this message]
2018-10-19 14:52 ` [PATCH 04/19] list-objects.c: remove implicit dependency on the_index Nguyễn Thái Ngọc Duy
2018-10-19 14:52 ` [PATCH 05/19] sequencer.c: " Nguyễn Thái Ngọc Duy
2018-10-19 14:52 ` [PATCH 06/19] sequencer.c: remove implicit dependency on the_repository Nguyễn Thái Ngọc Duy
2018-10-19 14:52 ` [PATCH 07/19] notes-merge.c: remove implicit dependency on the_index Nguyễn Thái Ngọc Duy
2018-10-19 14:52 ` [PATCH 08/19] notes-merge.c: remove implicit dependency the_repository Nguyễn Thái Ngọc Duy
2018-10-19 14:52 ` [PATCH 09/19] repository.c: replace hold_locked_index() with repo_hold_locked_index() Nguyễn Thái Ngọc Duy
2018-10-19 14:52 ` [PATCH 10/19] checkout: avoid the_index when possible Nguyễn Thái Ngọc Duy
2018-10-19 14:52 ` [PATCH 11/19] read-cache.c: kill read_index() Nguyễn Thái Ngọc Duy
2018-10-19 14:52 ` [PATCH 12/19] read-cache.c: replace update_index_if_able with repo_& Nguyễn Thái Ngọc Duy
2018-10-19 14:52 ` [PATCH 13/19] transport.c: remove implicit dependency on the_index Nguyễn Thái Ngọc Duy
2018-10-19 14:52 ` [PATCH 14/19] sha1-name.c: " Nguyễn Thái Ngọc Duy
2018-10-19 14:52 ` [PATCH 15/19] merge-recursive.c: " Nguyễn Thái Ngọc Duy
2018-10-19 14:52 ` [PATCH 16/19] merge-recursive.c: remove implicit dependency on the_repository Nguyễn Thái Ngọc Duy
2018-10-19 14:52 ` [PATCH 17/19] read-cache.c: remove the_* from index_has_changes() Nguyễn Thái Ngọc Duy
2018-10-19 14:52 ` [PATCH 18/19] cache.h: flip NO_THE_INDEX_COMPATIBILITY_MACROS switch Nguyễn Thái Ngọc Duy
2018-10-19 14:52 ` [PATCH 19/19] Flip NO_THE_REPOSITORY_COMPATIBILITY_MACROS Nguyễn Thái Ngọc Duy
2018-10-19 17:38 ` [PATCH/WIP 00/19] Kill the_index, final part Stefan Beller
2018-10-29 16:42 ` Duy Nguyen
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=20181019145237.16079-4-pclouds@gmail.com \
--to=pclouds@gmail.com \
--cc=git@vger.kernel.org \
--cc=sbeller@google.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).