We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8344ab commit 222b167Copy full SHA for 222b167
path.c
@@ -154,7 +154,7 @@ int validate_headref(const char *path)
154
/* Make sure it is a "refs/.." symlink */
155
if (S_ISLNK(st.st_mode)) {
156
len = readlink(path, buffer, sizeof(buffer)-1);
157
- if (len >= 11 && !memcmp("refs/heads/", buffer, 11))
+ if (len >= 5 && !memcmp("refs/", buffer, 5))
158
return 0;
159
return -1;
160
}
@@ -178,7 +178,7 @@ int validate_headref(const char *path)
178
len -= 4;
179
while (len && isspace(*buf))
180
buf++, len--;
181
- if (len >= 11 && !memcmp("refs/heads/", buf, 11))
+ if (len >= 5 && !memcmp("refs/", buf, 5))
182
183
184
0 commit comments