diff --git a/gitg/gitg-repository.c b/gitg/gitg-repository.c index b19ced87..68d1eb1b 100644 --- a/gitg/gitg-repository.c +++ b/gitg/gitg-repository.c @@ -942,7 +942,7 @@ load_current_ref(GitgRepository *self) return NULL; } - if (*out) + if (*out && !*(out + 1)) { ret = g_strdup(*out); } diff --git a/gitg/gitg-window.c b/gitg/gitg-window.c index 77ac4927..217c366f 100644 --- a/gitg/gitg-window.c +++ b/gitg/gitg-window.c @@ -793,7 +793,11 @@ fill_branches_combo(GitgWindow *window) COLUMN_BRANCHES_REF, NULL, -1); - if (!refset) + if (current_ref == NULL) + { + gtk_combo_box_set_active_iter (window->priv->combo_branches, &iter); + } + else if (!refset) { gtk_combo_box_set_active(window->priv->combo_branches, 0); }