summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c34d9c9)
raw | patch | inline | side by side (parent: c34d9c9)
author | Jonas Fonseca <fonseca@diku.dk> | |
Sun, 14 May 2006 06:23:01 +0000 (08:23 +0200) | ||
committer | Jonas Fonseca <fonseca@antimatter.localdomain> | |
Sun, 14 May 2006 06:23:01 +0000 (08:23 +0200) |
tig.c | patch | blob | history |
index 20abf8015c78da5212da3ed0b9338e2047e6ab56..d525251bf1215547d76f6c4ada0b39ccaf74b0c2 100644 (file)
--- a/tig.c
+++ b/tig.c
LINE(DIFF_CHUNK, "@@", COLOR_MAGENTA, COLOR_DEFAULT, 0), \
LINE(DIFF_ADD, "+", COLOR_GREEN, COLOR_DEFAULT, 0), \
LINE(DIFF_DEL, "-", COLOR_RED, COLOR_DEFAULT, 0), \
-LINE(DIFF_OLDMODE, "old mode ", COLOR_YELLOW, COLOR_DEFAULT, 0), \
-LINE(DIFF_NEWMODE, "new mode ", COLOR_YELLOW, COLOR_DEFAULT, 0), \
+LINE(DIFF_OLDMODE, "old file mode ", COLOR_YELLOW, COLOR_DEFAULT, 0), \
+LINE(DIFF_NEWMODE, "new file mode ", COLOR_YELLOW, COLOR_DEFAULT, 0), \
LINE(DIFF_COPY, "copy ", COLOR_YELLOW, COLOR_DEFAULT, 0), \
LINE(DIFF_RENAME, "rename ", COLOR_YELLOW, COLOR_DEFAULT, 0), \
LINE(DIFF_SIM, "similarity ", COLOR_YELLOW, COLOR_DEFAULT, 0), \
}
id_refs = tmp;
- id_refs[id_refs_size++] = &refs[i];
- if (id_refs_size > 1)
+ if (id_refs_size > 0)
id_refs[id_refs_size - 1]->next = 1;
+ id_refs[id_refs_size] = &refs[i];
+
+ /* XXX: The properties of the commit chains ensures that we can
+ * safely modify the shared ref. The repo references will
+ * always be similar for the same id. */
+ id_refs[id_refs_size]->next = 0;
+ id_refs_size++;
}
return id_refs;
if (!strncmp(name, "refs/tags/", STRING_SIZE("refs/tags/"))) {
name += STRING_SIZE("refs/tags/");
tag = TRUE;
+
+ } else if (!strncmp(name, "refs/heads/", STRING_SIZE("refs/heads/"))) {
+ name += STRING_SIZE("refs/heads/");
+
+ } else if (!strcmp(name, "HEAD")) {
+ continue;
}
refs = realloc(refs, sizeof(*refs) * (refs_size + 1));