*/
#ifndef VERSION
-#define VERSION "tig-0.3"
+#define VERSION "tig-0.4.git"
#endif
#ifndef DEBUG
"git log --cc --stat -n100 %s"
#define TIG_MAIN_CMD \
- "git log --topo-order --stat --pretty=raw %s"
+ "git log --topo-order --pretty=raw %s"
/* XXX: Needs to be defined to the empty string. */
#define TIG_HELP_CMD ""
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);
}