summaryrefslogtreecommitdiffstats
path: root/list-objects.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-07-24 14:50:47 -0700
committerJunio C Hamano <gitster@pobox.com>2018-07-24 14:50:47 -0700
commit8fa8a4f1ec088ab937d1c460f3eb1701e51b8ffc (patch)
tree4885e60c44a6e2ad259ca43986cb5fed9d01499d /list-objects.c
parent7633ff48ed3ee942cb9c1d233b41ef3a2676cb8a (diff)
parenta7e67c11b8b983b4a9f56f0b8990a550946ed6b0 (diff)
downloadgit-8fa8a4f1ec088ab937d1c460f3eb1701e51b8ffc.tar.gz
git-8fa8a4f1ec088ab937d1c460f3eb1701e51b8ffc.tar.xz
Merge branch 'jt/partial-clone-fsck-connectivity'
Partial clone support of "git clone" has been updated to correctly validate the objects it receives from the other side. The server side has been corrected to send objects that are directly requested, even if they may match the filtering criteria (e.g. when doing a "lazy blob" partial clone). * jt/partial-clone-fsck-connectivity: clone: check connectivity even if clone is partial upload-pack: send refs' objects despite "filter"
Diffstat (limited to 'list-objects.c')
-rw-r--r--list-objects.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/list-objects.c b/list-objects.c
index 3e5e1992e..b1f2138c2 100644
--- a/list-objects.c
+++ b/list-objects.c
@@ -48,7 +48,7 @@ static void process_blob(struct rev_info *revs,
pathlen = path->len;
strbuf_addstr(path, name);
- if (filter_fn)
+ if (!(obj->flags & USER_GIVEN) && filter_fn)
r = filter_fn(LOFS_BLOB, obj,
path->buf, &path->buf[pathlen],
filter_data);
@@ -133,7 +133,7 @@ static void process_tree(struct rev_info *revs,
}
strbuf_addstr(base, name);
- if (filter_fn)
+ if (!(obj->flags & USER_GIVEN) && filter_fn)
r = filter_fn(LOFS_BEGIN_TREE, obj,
base->buf, &base->buf[baselen],
filter_data);
@@ -172,7 +172,7 @@ static void process_tree(struct rev_info *revs,
cb_data, filter_fn, filter_data);
}
- if (filter_fn) {
+ if (!(obj->flags & USER_GIVEN) && filter_fn) {
r = filter_fn(LOFS_END_TREE, obj,
base->buf, &base->buf[baselen],
filter_data);