Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-11-11 00:39:01 +0300
committerJunio C Hamano <junkio@cox.net>2006-11-11 00:44:39 +0300
commit8eaf79869f9eddf50ddffffb8d73a054e0514fcd (patch)
tree41a85f19c2f32c2a9820663dd04e2e432837c739 /builtin-blame.c
parenta19f901d9f07b07abd2bfbad62037b9783fcaa7c (diff)
git-annotate: fix -S on graft file with comments.
The graft file can contain comment lines and read_graft_line can return NULL for such an input, which should be skipped by the reader. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-blame.c')
-rw-r--r--builtin-blame.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin-blame.c b/builtin-blame.c
index 16660221c3..066dee743e 100644
--- a/builtin-blame.c
+++ b/builtin-blame.c
@@ -1407,7 +1407,8 @@ static int read_ancestry(const char *graft_file)
/* The format is just "Commit Parent1 Parent2 ...\n" */
int len = strlen(buf);
struct commit_graft *graft = read_graft_line(buf, len);
- register_commit_graft(graft, 0);
+ if (graft)
+ register_commit_graft(graft, 0);
}
fclose(fp);
return 0;