cache.h: flip NO_THE_INDEX_COMPATIBILITY_MACROS switch
[gitweb.git] / builtin / grep.c
index 0cc671f7d6396dc03986a27d30b0149db1ebd9be..39a8e9d4a35a02e3bba8c43f77def39fa8f75bb2 100644 (file)
@@ -3,6 +3,7 @@
  *
  * Copyright (c) 2006 Junio C Hamano
  */
+#define USE_THE_INDEX_COMPATIBILITY_MACROS
 #include "cache.h"
 #include "repository.h"
 #include "config.h"
@@ -1021,7 +1022,8 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
                        break;
                }
 
-               if (get_oid_with_context(arg, GET_OID_RECORD_PATH,
+               if (get_oid_with_context(the_repository, arg,
+                                        GET_OID_RECORD_PATH,
                                         &oid, &oc)) {
                        if (seen_dashdash)
                                die(_("unable to resolve revision: %s"), arg);