From 80ce96ead7f77187d2b05cc91851fce87eb812a9 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Sat, 13 May 2006 23:44:21 +0200 Subject: [PATCH] Use --topo-order; fclose(stdin); space cleanup --- tig.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tig.c b/tig.c index c5f5419..6788d0e 100644 --- a/tig.c +++ b/tig.c @@ -635,7 +635,7 @@ static struct view_ops main_ops; "git log --cc --stat -n100 %s" #define MAIN_CMD \ - "git log --stat --pretty=raw %s" + "git log --topo-order --stat --pretty=raw %s" #define HELP_CMD \ "man tig 2> /dev/null" @@ -1000,7 +1000,10 @@ end_update(struct view *view) if (!view->pipe) return; set_nonblocking_input(FALSE); - pclose(view->pipe); + if (view->pipe == stdin) + fclose(view->pipe); + else + pclose(view->pipe); view->pipe = NULL; } @@ -1401,13 +1404,13 @@ pager_enter(struct view *view) return TRUE; } - static struct view_ops pager_ops = { pager_draw, pager_read, pager_enter, }; + static bool main_draw(struct view *view, unsigned int lineno) { -- 2.30.2