summaryrefslogtreecommitdiff
path: root/grep.c
diff options
context:
space:
mode:
Diffstat (limited to 'grep.c')
-rw-r--r--grep.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/grep.c b/grep.c
index 3d7cd0e96f..65b90c10a3 100644
--- a/grep.c
+++ b/grep.c
@@ -18,6 +18,11 @@ static void std_output(struct grep_opt *opt, const void *buf, size_t size)
fwrite(buf, size, 1, stdout);
}
+static void color_set(char *dst, const char *color_bytes)
+{
+ xsnprintf(dst, COLOR_MAXLEN, "%s", color_bytes);
+}
+
/*
* Initialize the grep_defaults template with hardcoded defaults.
* We could let the compiler do this, but without C99 initializers
@@ -2010,7 +2015,7 @@ static int grep_source_load_oid(struct grep_source *gs)
enum object_type type;
grep_read_lock();
- gs->buf = read_sha1_file(gs->identifier, &type, &gs->size);
+ gs->buf = read_object_file(gs->identifier, &type, &gs->size);
grep_read_unlock();
if (!gs->buf)