summaryrefslogtreecommitdiff
path: root/t/t4046-diff-unmerged.sh
diff options
context:
space:
mode:
authorLibravatar ZheNing Hu <adlternative@gmail.com>2021-07-26 03:26:46 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-07-26 12:01:25 -0700
commit311d0b8e8e370bc9f6168af1f4e120d2b0975702 (patch)
tree8103f225f9e00cef0e1e31498a2a11b03c14f3fc /t/t4046-diff-unmerged.sh
parentMerge branch 'zh/cat-file-batch-fix' into zh/ref-filter-raw-data (diff)
downloadtgif-311d0b8e8e370bc9f6168af1f4e120d2b0975702.tar.xz
ref-filter: add obj-type check in grab contents
Only tag and commit objects use `grab_sub_body_contents()` to grab object contents in the current codebase. We want to teach the function to also handle blobs and trees to get their raw data, without parsing a blob (whose contents looks like a commit or a tag) incorrectly as a commit or a tag. So it's needed to pass a `struct expand_data *data` instread of only `void *buf` to both `grab_sub_body_contents()` and `grab_values()` to be able to check the object type. Skip the block of code that is specific to handling commits and tags early when the given object is of a wrong type to help later addition to handle other types of objects in this function. Reviewed-by: Jacob Keller <jacob.keller@gmail.com> Mentored-by: Christian Couder <christian.couder@gmail.com> Mentored-by: Hariom Verma <hariom18599@gmail.com> Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: ZheNing Hu <adlternative@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4046-diff-unmerged.sh')
0 files changed, 0 insertions, 0 deletions