chiark
/
gitweb
/
~mdw
/
tig
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
aea510c
)
main_read: handle titles that start with whitespace
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
|
blame
|
history
diff --git
a/tig.c
b/tig.c
index 5255e14ec26543278491ba56f1f9ad943deeb765..b864e0b6e8d1953046637169509aaf736f32a209 100644
(file)
--- a/
tig.c
+++ b/
tig.c
@@
-2887,13
+2887,19
@@
main_read(struct view *view, char *line)
/* Require titles to start with a non-space character at the
* offset used by git log. */
/* 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;
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;
}
return TRUE;