summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2c27faa)
raw | patch | inline | side by side (parent: 2c27faa)
author | Jonas Fonseca <fonseca@diku.dk> | |
Thu, 14 Sep 2006 00:23:22 +0000 (02:23 +0200) | ||
committer | Jonas Fonseca <fonseca@antimatter.localdomain> | |
Thu, 14 Sep 2006 00:23:22 +0000 (02:23 +0200) |
tig.c | patch | blob | history |
index cc39d7ea8076c1ef6c7882919ea9fde2ce4e4fa9..fefec61ee15b1a4d586d4dc7fb81959815fc5774 100644 (file)
--- a/tig.c
+++ b/tig.c
report("Allocation failure");
end:
+ view->ops->read(view, NULL);
end_update(view);
return FALSE;
}
{
struct line *line = &view->line[view->lines];
+ if (!data)
+ return TRUE;
+
line->data = strdup(data);
if (!line->data)
return FALSE;
static bool
tree_read(struct view *view, char *text)
{
- size_t textlen = strlen(text);
+ size_t textlen = text ? strlen(text) : 0;
char buf[SIZEOF_STR];
unsigned long pos;
enum line_type type;
{ '`', '.' },
{ '\'', ' ' },
{ '/', ' ' },
-
};
chtype symbol = get_rev_graph_symbol(graph);
struct rev_filler *filler;
main_read(struct view *view, char *line)
{
static struct rev_graph *graph = graph_stacks;
- enum line_type type = get_line_type(line);
+ enum line_type type;
struct commit *commit = view->lines
? view->line[view->lines - 1].data : NULL;
+ if (!line) {
+ return TRUE;
+ }
+
+ type = get_line_type(line);
+
switch (type) {
case LINE_COMMIT:
commit = calloc(1, sizeof(struct commit));