From: Jonas Fonseca Date: Sat, 13 May 2006 21:44:21 +0000 (+0200) Subject: Use --topo-order; fclose(stdin); space cleanup X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=80ce96ead7f77187d2b05cc91851fce87eb812a9;p=tig.git Use --topo-order; fclose(stdin); space cleanup --- 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) {