summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4a0fc95)
raw | patch | inline | side by side (parent: 4a0fc95)
author | Junio C Hamano <junkio@cox.net> | |
Sat, 21 Oct 2006 06:49:31 +0000 (23:49 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 21 Oct 2006 06:49:41 +0000 (23:49 -0700) |
We need the commit buffer data while generating the final result,
but until then we do not need them.
Signed-off-by: Junio C Hamano <junkio@cox.net>
but until then we do not need them.
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-pickaxe.c | patch | blob | history |
diff --git a/builtin-pickaxe.c b/builtin-pickaxe.c
index e5a50b92786a56b09b39034eac0f821ead4ae0fb..e628b5a807600c7555e10e6f40f45cf11f1a6055 100644 (file)
--- a/builtin-pickaxe.c
+++ b/builtin-pickaxe.c
/* linked list of blames */
struct blame_entry *ent;
+ /* look-up a line in the final buffer */
int num_lines;
int *lineno;
};
for (i = 0; i < diff_queued_diff.nr; i++) {
struct diff_filepair *p = diff_queued_diff.queue[i];
- if (p->status == 'R' && !strcmp(p->one->path, origin->path)) {
+ if ((p->status == 'R' || p->status == 'C') &&
+ !strcmp(p->one->path, origin->path)) {
porigin = find_origin(sb, parent, p->two->path);
break;
}
if (1) { /* sanity */
struct blame_entry *ent;
- int lno = 0, corrupt = 0;
+ int lno = sb->ent->lno, corrupt = 0;
for (ent = sb->ent; ent; ent = ent->next) {
if (lno != ent->lno)
lno += ent->num_lines;
}
if (corrupt) {
- lno = 0;
+ lno = sb->ent->lno;
for (ent = sb->ent; ent; ent = ent->next) {
printf("L %8d l %8d n %8d\n",
lno, ent->lno, ent->num_lines);
int tlno, int plno, int same,
struct origin *target, struct origin *parent)
{
- struct blame_entry *e, *n;
+ struct blame_entry *e;
- for (e = sb->ent; e; e = n) {
- n = e->next;
+ for (e = sb->ent; e; e = e->next) {
if (e->guilty || e->suspect != target)
continue;
if (same <= e->s_lno)
if (e->score)
return e->score;
- score = 0;
+ score = 1;
cp = nth_line(sb, e->lno);
ep = nth_line(sb, e->lno + e->num_lines);
while (cp < ep) {
static char committer_buf[1024];
static char summary_buf[1024];
+ /* We've operated without save_commit_buffer, so
+ * we now need to populate them for output.
+ */
+ if (!commit->buffer) {
+ char type[20];
+ unsigned long size;
+ commit->buffer =
+ read_sha1_file(commit->object.sha1, type, &size);
+ }
ret->author = author_buf;
get_ac_line(commit->buffer, "\nauthor ",
sizeof(author_buf), author_buf, &ret->author_mail,
const char *final_commit_name = NULL;
char type[10];
+ save_commit_buffer = 0;
+
opt = 0;
bottom = top = 0;
seen_dashdash = 0;