Code

Fix parsing of boolean show-date values
authorJonas Fonseca <jonas.fonseca@savoirfairelinux.com>
Fri, 11 Dec 2009 22:13:37 +0000 (17:13 -0500)
committerJonas Fonseca <jonas.fonseca@savoirfairelinux.com>
Fri, 11 Dec 2009 22:13:37 +0000 (17:13 -0500)
It was broken during the introduction of relative dates.

NEWS
tig.c

diff --git a/NEWS b/NEWS
index 31b5169586ce2bd76aa87cca9bbc41dec3b1d9f4..e80e847eed2fdd947c3aa5ad7f45dc72bdcb00b7 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -22,6 +22,7 @@ Bug fixes:
 
  - Status view: fix usage from sub directories, which was broken by the
    changes made to support blame view from sub directories.
+ - Fix parsing of boolean show-date values.
 
 tig-0.15
 --------
diff --git a/tig.c b/tig.c
index 935f4471e5c31927d0c24f594ddf6b26631928bc..cf4e61a131a5b8c8286e4d97bba2f0faaa88e180 100644 (file)
--- a/tig.c
+++ b/tig.c
@@ -1703,8 +1703,9 @@ option_set_command(int argc, const char *argv[])
                } else if (!strcmp(argv[2], "short")) {
                        opt_date = DATE_SHORT;
                        return OK;
-               } else if (parse_bool(&show_date, argv[2])) {
+               } else if (parse_bool(&show_date, argv[2]) == OK) {
                        opt_date = show_date ? DATE_DEFAULT : DATE_NONE;
+                       return OK;
                }
                return ERR;
        }