File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -365,12 +365,17 @@ static const char *loose_parse_symbolic(git_buf *file_content)
365365 return refname_start ;
366366}
367367
368+ /*
369+ * Returns whether a reference is stored per worktree or not.
370+ * Per-worktree references are:
371+ *
372+ * - all pseudorefs, e.g. HEAD and MERGE_HEAD
373+ * - all references stored inside of "refs/bisect/"
374+ */
368375static bool is_per_worktree_ref (const char * ref_name )
369376{
370- return strcmp ("HEAD" , ref_name ) == 0 ||
371- strcmp ("FETCH_HEAD" , ref_name ) == 0 ||
372- strcmp ("MERGE_HEAD" , ref_name ) == 0 ||
373- strcmp ("ORIG_HEAD" , ref_name ) == 0 ;
377+ return git__prefixcmp (ref_name , "refs/" ) != 0 ||
378+ git__prefixcmp (ref_name , "refs/bisect/" ) == 0 ;
374379}
375380
376381static int loose_lookup (
You can’t perform that action at this time.
0 commit comments