summaryrefslogtreecommitdiff
path: root/src/filter.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/filter.c')
-rw-r--r--src/filter.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/filter.c b/src/filter.c
index dd7d2f7ec..73497cb30 100644
--- a/src/filter.c
+++ b/src/filter.c
@@ -446,7 +446,13 @@ static int filter_list_check_attributes(
if ((src->options.flags & GIT_FILTER_ATTRIBUTES_FROM_COMMIT) != 0) {
attr_opts.flags |= GIT_ATTR_CHECK_INCLUDE_COMMIT;
- attr_opts.commit_id = src->options.commit_id;
+
+#ifndef GIT_DEPRECATE_HARD
+ if (src->options.commit_id)
+ git_oid_cpy(&attr_opts.attr_commit_id, src->options.commit_id);
+ else
+#endif
+ git_oid_cpy(&attr_opts.attr_commit_id, &src->options.attr_commit_id);
}
error = git_attr_get_many_with_session(