diff --git a/builtin-blame.c b/builtin-blame.c
index 6b7b9f4466989ca02d3a5e53caac9ff5c7e8a922..48cc0c175d52446266658d785de0311daaaf4776 100644 (file)
--- a/builtin-blame.c
+++ b/builtin-blame.c
if (!DIFF_FILE_VALID(p->one))
continue; /* does not exist in parent */
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;
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 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;
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);
origin = make_origin(commit, path);
- strbuf_init(&buf, 0);
if (!contents_from || strcmp("-", contents_from)) {
struct stat st;
const char *read_from;
if (!contents_from || strcmp("-", contents_from)) {
struct stat st;
const char *read_from;