Revision 569740bdd0533ef5cf032edd6233710161a35725 authored by Miklos Vajna on 26 October 2008, 02:33:58 UTC, committed by Junio C Hamano on 26 October 2008, 21:44:25 UTC
Till now --no-deref was just ignored when deleting refs, fix this. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 450d4c0
strcasestr.c
#include "../git-compat-util.h"
char *gitstrcasestr(const char *haystack, const char *needle)
{
int nlen = strlen(needle);
int hlen = strlen(haystack) - nlen + 1;
int i;
for (i = 0; i < hlen; i++) {
int j;
for (j = 0; j < nlen; j++) {
unsigned char c1 = haystack[i+j];
unsigned char c2 = needle[j];
if (toupper(c1) != toupper(c2))
goto next;
}
return (char *) haystack + i;
next:
;
}
return NULL;
}
Computing file changes ...