X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-blame.c;h=48cc0c175d52446266658d785de0311daaaf4776;hb=158629b2c9baffd0352306bd8dfa0784c981955d;hp=6b7b9f4466989ca02d3a5e53caac9ff5c7e8a922;hpb=277cd4c4bd8cca31395846fc80ea28bf2cd4ddf2;p=git.git diff --git a/builtin-blame.c b/builtin-blame.c index 6b7b9f446..48cc0c175 100644 --- a/builtin-blame.c +++ b/builtin-blame.c @@ -1132,6 +1132,8 @@ static int find_copy_in_parent(struct scoreboard *sb, if (!DIFF_FILE_VALID(p->one)) continue; /* does not exist in parent */ + if (S_ISGITLINK(p->one->mode)) + continue; /* ignore git links */ if (porigin && !strcmp(p->one->path, porigin->path)) /* find_move already dealt with this path */ continue; @@ -2060,7 +2062,7 @@ static struct commit *fake_working_tree_commit(const char *path, const char *con struct commit *commit; struct origin *origin; unsigned char head_sha1[20]; - struct strbuf buf; + struct strbuf buf = STRBUF_INIT; const char *ident; time_t now; int size, len; @@ -2080,7 +2082,6 @@ static struct commit *fake_working_tree_commit(const char *path, const char *con origin = make_origin(commit, path); - strbuf_init(&buf, 0); if (!contents_from || strcmp("-", contents_from)) { struct stat st; const char *read_from;