"git ls-remote . 2>/dev/null"
#define TIG_DIFF_CMD \
- "git show --patch-with-stat --find-copies-harder -B -C %s"
+ "git show --root --patch-with-stat --find-copies-harder -B -C %s 2>/dev/null"
#define TIG_LOG_CMD \
- "git log --cc --stat -n100 %s"
+ "git log --cc --stat -n100 %s 2>/dev/null"
#define TIG_MAIN_CMD \
- "git log --topo-order --pretty=raw %s"
+ "git log --topo-order --pretty=raw %s 2>/dev/null"
/* XXX: Needs to be defined to the empty string. */
#define TIG_HELP_CMD ""
{ 'v', REQ_SHOW_VERSION },
{ 'r', REQ_SCREEN_REDRAW },
{ 'n', REQ_TOGGLE_LINENO },
- { 'g', REQ_TOGGLE_REV_GRAPH},
+ { 'g', REQ_TOGGLE_REV_GRAPH },
{ ':', REQ_PROMPT },
/* wgetch() with nodelay() enabled returns ERR when there's no input. */
break;
if (end) {
+ char *email = end + 1;
+
for (; end > ident && isspace(end[-1]); end--) ;
+
+ if (end == ident && *email) {
+ ident = email;
+ end = strchr(ident, '>');
+ for (; end > ident && isspace(end[-1]); end--) ;
+ }
*end = 0;
}
+ /* End is NULL or ident meaning there's no author. */
+ if (end <= ident)
+ ident = "Unknown";
+
string_copy(commit->author, ident);
/* Parse epoch and timezone */
/* Leave stdin and stdout alone when acting as a pager. */
FILE *io = fopen("/dev/tty", "r+");
+ if (!io)
+ die("Failed to open /dev/tty");
cursed = !!newterm(NULL, io, io);
}