Make a temporary solution for commands that could use objectsize:disk atom. It's better to fill it with value or give an error if there is no value for this atom, but as a first solution we do dothing. It means that if objectsize:disk is used, we put an empty string there. Signed-off-by: Olga Telezhnaia <olyatelezhnaya@xxxxxxxxx> Mentored-by: Christian Couder <christian.couder@xxxxxxxxx> Mentored by: Jeff King <peff@xxxxxxxx> --- ref-filter.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ref-filter.c b/ref-filter.c index aa15dd0b4723e..b21358aea476b 100644 --- a/ref-filter.c +++ b/ref-filter.c @@ -826,8 +826,10 @@ static void grab_common_values(struct atom_value *val, int deref, struct object v->value = sz; v->s = xstrfmt("%lu", sz); } else if (!strcmp(name, "objectsize:disk")) { - v->value = cat_file_info.disk_size; - v->s = xstrfmt("%"PRIuMAX, (uintmax_t)v->value); + if (is_cat) { + v->value = cat_file_info.disk_size; + v->s = xstrfmt("%"PRIuMAX, (uintmax_t)v->value); + } } else if (deref) grab_objectname(name, obj->oid.hash, v, &used_atom[i]); } -- https://github.com/git/git/pull/452