Code

Fix usage of the status view from a sub directory
authorJonas Fonseca <jonas.fonseca@savoirfairelinux.com>
Fri, 11 Dec 2009 22:03:17 +0000 (17:03 -0500)
committerJonas Fonseca <jonas.fonseca@savoirfairelinux.com>
Fri, 11 Dec 2009 22:03:17 +0000 (17:03 -0500)
NEWS
tig.c

diff --git a/NEWS b/NEWS
index 67ebad8ef0504b370972774dc252b72880646192..31b5169586ce2bd76aa87cca9bbc41dec3b1d9f4 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -18,6 +18,11 @@ Improvements:
  - Branch view: add entry to browse all branches (uses git-log's --all
    flag).
 
+Bug fixes:
+
+ - Status view: fix usage from sub directories, which was broken by the
+   changes made to support blame view from sub directories.
+
 tig-0.15
 --------
 
diff --git a/tig.c b/tig.c
index 9710d6fd0dd6ca3d2dd73c828e4ce9009caeed48..6957ff5959575478fec9dfe9110d7cb1ec15a66d 100644 (file)
--- a/tig.c
+++ b/tig.c
@@ -5311,7 +5311,7 @@ status_run(struct view *view, const char *argv[], char status, enum line_type ty
        char *buf;
        struct io io = {};
 
-       if (!run_io(&io, argv, NULL, IO_RD))
+       if (!run_io(&io, argv, opt_cdup, IO_RD))
                return FALSE;
 
        add_line_data(view, NULL, type);
@@ -5709,10 +5709,8 @@ status_update_prepare(struct io *io, enum line_type type)
                return run_io(io, staged_argv, opt_cdup, IO_WR);
 
        case LINE_STAT_UNSTAGED:
-               return run_io(io, others_argv, opt_cdup, IO_WR);
-
        case LINE_STAT_UNTRACKED:
-               return run_io(io, others_argv, NULL, IO_WR);
+               return run_io(io, others_argv, opt_cdup, IO_WR);
 
        default:
                die("line type %d not handled in switch", type);