1. Stefan Saasen
  2. git

Commits

Jonas Fonseca  committed 85912b0

[PATCH] Fix symbolic ref validation

Use the correct buffer when validating 'ref: refs/...'

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Junio C Hamano <junkio@cox.net>

  • Participants
  • Parent commits d6e548d
  • Branches master

Comments (0)

Files changed (1)

File refs.c

View file
 	len -= 4;
 	while (len && isspace(*buf))
 		buf++, len--;
-	if (len >= 5 && !memcmp("refs/", buffer, 5))
+	if (len >= 5 && !memcmp("refs/", buf, 5))
 		return 0;
 	return -1;
 }