Teach diff -a as shorthand for --text
[gitweb.git] / sha1_name.c
index cd85d1fa0f9f2afb4e159cb635db435e75ef3e58..f2cbafa496231e7a9cdbbea2ab4e7d4c4ed761ab 100644 (file)
@@ -262,7 +262,7 @@ static int get_sha1_basic(const char *str, int len, unsigned char *sha1)
                if (str[am] == '@' && str[am+1] == '{' && str[len-1] == '}') {
                        int date_len = len - am - 3;
                        char *date_spec = xmalloc(date_len + 1);
-                       safe_strncpy(date_spec, str + am + 2, date_len + 1);
+                       strlcpy(date_spec, str + am + 2, date_len + 1);
                        at_time = approxidate(date_spec);
                        free(date_spec);
                        len = am;