GNOME Bugzilla – Bug 699146
display error when opening directory without a git repository
Last modified: 2013-07-06 05:31:47 UTC
To see the problem, choose Open Repository, then choose a directory which does not contain a git repository. The operation fails silently. Instead, gitg should display an error message such as "The directory <path> does not contain a git repository."
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. *** This bug has been marked as a duplicate of bug 699233 ***
Oh damn, I forgot to check the timestamps before marking this bug as resolved and duplicate of the one I filed! Sorry again, Adam :( The correct choice was to close the bug I filed as duplicate of this bug.
Yes, usually the right thing to do is to close the newer bug as a duplicate of the older one. :)
And by the way, you don't need to compare timestamps - just compare the bug numbers. :)
*** Bug 699233 has been marked as a duplicate of this bug. ***
*** Bug 697938 has been marked as a duplicate of this bug. ***
Created attachment 247380 [details] [review] Add infobar Please review, based on this I can route currently silent errors to infobar and solve bug 699153, bug 699146.
Review of attachment 247380 [details] [review]: The patch looks good to me, but I had no chance to test it yet Just a tiny nitpick below ::: gitg/gitg-window.vala @@ -207,2 +216,3 @@ } title = @"$(d_repository.name) ($parent_path) - gitg"; + if (infobar.visible) no need to check if it is visible, just call hide(), if it is already hidden it is a no-op
Created attachment 247481 [details] [review] Add infobar Updated patch, please review. Thank you!
Review of attachment 247481 [details] [review]: ::: gitg/gitg-window.vala @@ +697,3 @@ + infobar.message_type = type; + infobar_label_primary.set_label ("<b>%s</b>".printf (primary_msg)); + infobar_label_secondary.set_label ("<small>%s</small>".printf (secondary_msg)); Just a minor detail here, but maybe we should escape the primary and secondary message. Otherwise the caller needs to make sure they are properly escaped.
Created attachment 247513 [details] [review] Add infobar Updated patch, please review. Thanks.
Review of attachment 247513 [details] [review]: Check the inline comments. Also I would like to have the infobar inside a revealer. ::: gitg/gitg-window.vala @@ +144,2 @@ d_main_settings = new Settings("org.gnome.gitg.preferences.view.main"); + d_interface_settings = new Settings("orgf.gnome.gitg.preferences.interface"); why this change? a typo by mistake? ::: gitg/resources/ui/gitg-window.ui @@ +134,3 @@ + <property name="spacing">16</property> + <child> + <object class="GtkLabel" id="infobar_label_primary"> infobar_primary_label @@ +148,3 @@ + </child> + <child> + <object class="GtkLabel" id="infobar_label_secondary"> infobar_secondary_label @@ +170,3 @@ + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="infobar_button_close"> infobar_close_button
Created attachment 247522 [details] [review] Add infobar Updated patch.
Review of attachment 247522 [details] [review]: Looks good to me. In a second patch I'd like you to modify it to use a GtkRevealer similar to what we do in gedit-tab.c
(In reply to comment #14) > Review of attachment 247522 [details] [review]: > > Looks good to me. In a second patch I'd like you to modify it to use a > GtkRevealer similar to what we do in gedit-tab.c Committed to master in a5972bd Available at https://git.gnome.org/browse/gitg/commit/?id=a5972bd72c9f7ce495bdbc0c61f0e9262c519afe Leaving bug open for the next iteration of the patch that will make Infobar use GtkRevealer.
Infobar was made to use GtkRevealer in commit b8fa527. Available at https://git.gnome.org/browse/gitg/commit/?id=b8fa527842bb7c53b0140577a33281a5b9ed3d30 Closing bug with status 'RESOLVED' and 'FIXED', as all requirements seem have to been satisfied. Thank you.