summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: aea510c)
raw | patch | inline | side by side (parent: aea510c)
author | Jonas Fonseca <fonseca@diku.dk> | |
Sun, 29 Oct 2006 14:21:13 +0000 (15:21 +0100) | ||
committer | Jonas Fonseca <fonseca@diku.dk> | |
Sun, 29 Oct 2006 14:21:13 +0000 (15:21 +0100) |
tig.c | patch | blob | history |
index 5255e14ec26543278491ba56f1f9ad943deeb765..b864e0b6e8d1953046637169509aaf736f32a209 100644 (file)
--- a/tig.c
+++ b/tig.c
/* Require titles to start with a non-space character at the
* offset used by git log. */
- /* FIXME: More gracefull handling of titles; append "..." to
- * shortened titles, etc. */
- if (strncmp(line, " ", 4) ||
- isspace(line[4]))
+ if (strncmp(line, " ", 4))
+ break;
+ line += 4;
+ /* Well, if the title starts with a whitespace character,
+ * try to be forgiving. Otherwise we end up with no title. */
+ while (isspace(*line))
+ line++;
+ if (*line == '\0')
break;
+ /* FIXME: More graceful handling of titles; append "..." to
+ * shortened titles, etc. */
- string_copy(commit->title, line + 4);
+ string_copy(commit->title, line);
}
return TRUE;