From: Jonas Fonseca Date: Tue, 5 Aug 2008 21:40:21 +0000 (+0200) Subject: Clean up incomplete commits from main view listed for --no-walk X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ad9f9954419b5d3f595580d5184db59a00711f92;p=tig.git Clean up incomplete commits from main view listed for --no-walk When --no-walk is given on the command line by the user it causes boundary commits to be output with just the commit line, i.e: > git rev-list --pretty=raw --boundary --no-walk HEAD commit 60e8ea56880fc2e42008075d516c356ef605bc60 tree 5b76086e4deaf62d3f7baffc6f49840f61d4e79c parent 145194bdfc8bf0b58185bbe28bc0097ce429de4d author Jonas Fonseca 1217797175 +0200 committer Jonas Fonseca 1217797402 +0200 Remove the global opt_request variable commit -145194bdfc8bf0b58185bbe28bc0097ce429de4d --- diff --git a/NEWS b/NEWS index b7a8df1..d93fb04 100644 --- a/NEWS +++ b/NEWS @@ -22,6 +22,7 @@ Bug fixes: keybinding to launch the merge tool in the status view. - Fix problem with $(cmd) usage in shell code. Some shells (jsh) installed as /bin/sh does not support it. + - Do not show incomplete boundary commits when --no-walk is used. - Documentation: Rename gitlink macro to support AsciiDoc 8.2.3. tig-0.11 diff --git a/tig.c b/tig.c index 6846519..6b111e4 100644 --- a/tig.c +++ b/tig.c @@ -4983,6 +4983,14 @@ main_read(struct view *view, char *line) if (!line) { if (!view->lines && !view->parent) die("No revisions match the given arguments."); + if (view->lines > 0) { + commit = view->line[view->lines - 1].data; + if (!*commit->author) { + view->lines--; + free(commit); + graph->commit = NULL; + } + } update_rev_graph(graph); return TRUE; }