grep: honor --textconv for the case rev:path
Make "grep" honor the "--textconv" option also for the object case, i.e. when used with an argument "rev:path". Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
335ec3bf41
commit
afa15f3cd8
26
object.c
26
object.c
@ -255,12 +255,7 @@ int object_list_contains(struct object_list *list, struct object *obj)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void add_object_array(struct object *obj, const char *name, struct object_array *array)
|
||||
{
|
||||
add_object_array_with_mode(obj, name, array, S_IFINVALID);
|
||||
}
|
||||
|
||||
void add_object_array_with_mode(struct object *obj, const char *name, struct object_array *array, unsigned mode)
|
||||
static void add_object_array_with_mode_context(struct object *obj, const char *name, struct object_array *array, unsigned mode, struct object_context *context)
|
||||
{
|
||||
unsigned nr = array->nr;
|
||||
unsigned alloc = array->alloc;
|
||||
@ -275,9 +270,28 @@ void add_object_array_with_mode(struct object *obj, const char *name, struct obj
|
||||
objects[nr].item = obj;
|
||||
objects[nr].name = name;
|
||||
objects[nr].mode = mode;
|
||||
objects[nr].context = context;
|
||||
array->nr = ++nr;
|
||||
}
|
||||
|
||||
void add_object_array(struct object *obj, const char *name, struct object_array *array)
|
||||
{
|
||||
add_object_array_with_mode(obj, name, array, S_IFINVALID);
|
||||
}
|
||||
|
||||
void add_object_array_with_mode(struct object *obj, const char *name, struct object_array *array, unsigned mode)
|
||||
{
|
||||
add_object_array_with_mode_context(obj, name, array, mode, NULL);
|
||||
}
|
||||
|
||||
void add_object_array_with_context(struct object *obj, const char *name, struct object_array *array, struct object_context *context)
|
||||
{
|
||||
if (context)
|
||||
add_object_array_with_mode_context(obj, name, array, context->mode, context);
|
||||
else
|
||||
add_object_array_with_mode_context(obj, name, array, S_IFINVALID, context);
|
||||
}
|
||||
|
||||
void object_array_remove_duplicates(struct object_array *array)
|
||||
{
|
||||
unsigned int ref, src, dst;
|
||||
|
Reference in New Issue
Block a user