mirror of
https://gitlab.gnome.org/GNOME/gitg
synced 2024-06-30 23:29:33 +00:00
Add HEAD in refs list if head is detached
This commit is contained in:
parent
688d8a2d81
commit
78cf3561d7
|
@ -690,6 +690,15 @@ public class RefsList : Gtk.ListBox
|
|||
|
||||
RefRow? head = null;
|
||||
|
||||
try
|
||||
{
|
||||
if (d_repository.is_head_detached())
|
||||
{
|
||||
head = add_ref_internal(d_repository.lookup_reference("HEAD"));
|
||||
}
|
||||
}
|
||||
catch {}
|
||||
|
||||
try
|
||||
{
|
||||
d_repository.references_foreach_name((nm) => {
|
||||
|
|
|
@ -112,6 +112,11 @@ public class ParsedRefName : Object
|
|||
d_shortname = name;
|
||||
d_prefix = null;
|
||||
|
||||
if (d_name == "HEAD")
|
||||
{
|
||||
rtype = RefType.BRANCH;
|
||||
}
|
||||
|
||||
for (var i = 0; i < prefixes.length; ++i)
|
||||
{
|
||||
if (!d_name.has_prefix(prefixes[i]))
|
||||
|
|
Loading…
Reference in New Issue
Block a user