diffcore-pickaxe: support case insensitive match on non-ascii
[gitweb.git] / sha1_file.c
index 2c68766ebf0cab5f13f684ac3e26061b93bda44a..aab1872b4c95416fc7c8ae9c93cd25f341e2d4c1 100644 (file)
@@ -36,6 +36,7 @@
 static inline uintmax_t sz_fmt(size_t s) { return s; }
 
 const unsigned char null_sha1[20];
+const struct object_id null_oid;
 
 /*
  * This is meant to hold a *small* number of objects that you would
@@ -395,7 +396,7 @@ void add_to_alternates_file(const char *reference)
                struct strbuf line = STRBUF_INIT;
                int found = 0;
 
-               while (strbuf_getline(&line, in, '\n') != EOF) {
+               while (strbuf_getline(&line, in) != EOF) {
                        if (!strcmp(reference, line.buf)) {
                                found = 1;
                                break;