[gitg] Add quotes around branch name



commit c9c9a24c7d70449c9acae5d7b0ea9c89f212e4d9
Author: Jesse van den Kieboom <jessevdk gnome org>
Date:   Fri Aug 14 00:53:30 2015 +0200

    Add quotes around branch name

 gitg/gitg-ref-action-checkout.vala |    2 +-
 tests/gitg/test-checkout-ref.vala  |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gitg/gitg-ref-action-checkout.vala b/gitg/gitg-ref-action-checkout.vala
index 3b57109..834b095 100644
--- a/gitg/gitg-ref-action-checkout.vala
+++ b/gitg/gitg-ref-action-checkout.vala
@@ -69,7 +69,7 @@ class RefActionCheckout : GitgExt.UIElement, GitgExt.Action, GitgExt.RefAction,
        public async bool checkout()
        {
                var repo = application.repository;
-               var notification = new SimpleNotification(_("Checkout 
%s").printf(reference.parsed_name.shortname));
+               var notification = new SimpleNotification(_("Checkout 
%s").printf(@"'$(reference.parsed_name.shortname)'"));
                bool retval = false;
 
                application.notifications.add(notification);
diff --git a/tests/gitg/test-checkout-ref.vala b/tests/gitg/test-checkout-ref.vala
index 2cc9615..000620c 100644
--- a/tests/gitg/test-checkout-ref.vala
+++ b/tests/gitg/test-checkout-ref.vala
@@ -55,7 +55,7 @@ class Gitg.Test.CheckoutRef : Application
                loop.run();
 
                assert_inteq(simple_notifications.size, 1);
-               assert_streq(simple_notifications[0].title, "Checkout thebranch");
+               assert_streq(simple_notifications[0].title, "Checkout 'thebranch'");
                assert_inteq(simple_notifications[0].status, SimpleNotification.Status.SUCCESS);
                assert_streq(simple_notifications[0].message, "Successfully checked out branch to working 
directory");
                assert_file_contents("a", "lala\n");
@@ -75,7 +75,7 @@ class Gitg.Test.CheckoutRef : Application
                loop.run();
 
                assert_inteq(simple_notifications.size, 1);
-               assert_streq(simple_notifications[0].title, "Checkout thebranch");
+               assert_streq(simple_notifications[0].title, "Checkout 'thebranch'");
                assert_inteq(simple_notifications[0].status, SimpleNotification.Status.SUCCESS);
                assert_streq(simple_notifications[0].message, "Successfully checked out branch to working 
directory");
                assert_file_contents("b", "something changed\n");
@@ -95,7 +95,7 @@ class Gitg.Test.CheckoutRef : Application
                loop.run();
 
                assert_inteq(simple_notifications.size, 1);
-               assert_streq(simple_notifications[0].title, "Checkout thebranch");
+               assert_streq(simple_notifications[0].title, "Checkout 'thebranch'");
                assert_inteq(simple_notifications[0].status, SimpleNotification.Status.ERROR);
                assert_streq(simple_notifications[0].message, "Failed to checkout branch: 1 conflict prevents 
checkout");
                assert_file_contents("a", "something changed\n");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]