File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -1160,7 +1160,7 @@ int ref_is_hidden(const char *refname, const char *refname_full)
1160
1160
const char * match = hide_refs -> items [i ].string ;
1161
1161
const char * subject ;
1162
1162
int neg = 0 ;
1163
- int len ;
1163
+ const char * p ;
1164
1164
1165
1165
if (* match == '!' ) {
1166
1166
neg = 1 ;
@@ -1175,10 +1175,9 @@ int ref_is_hidden(const char *refname, const char *refname_full)
1175
1175
}
1176
1176
1177
1177
/* refname can be NULL when namespaces are used. */
1178
- if (!subject || !starts_with (subject , match ))
1179
- continue ;
1180
- len = strlen (match );
1181
- if (!subject [len ] || subject [len ] == '/' )
1178
+ if (subject &&
1179
+ skip_prefix (subject , match , & p ) &&
1180
+ (!* p || * p == '/' ))
1182
1181
return !neg ;
1183
1182
}
1184
1183
return 0 ;
You can’t perform that action at this time.
0 commit comments