Merge branch 'cb/log-follow-with-combined' into maint

"git log -c --follow $path" segfaulted upon hitting the commit that
renamed the $path being followed.

* cb/log-follow-with-combined:
  fix segfault with git log -c --follow
This commit is contained in:
Junio C Hamano
2013-07-03 15:30:59 -07:00
2 changed files with 17 additions and 0 deletions

View File

@ -1305,6 +1305,7 @@ void diff_tree_combined(const unsigned char *sha1,
int i, num_paths, needsep, show_log_first, num_parent = parents->nr;
diffopts = *opt;
diff_tree_setup_paths(diffopts.pathspec.raw, &diffopts);
diffopts.output_format = DIFF_FORMAT_NO_OUTPUT;
DIFF_OPT_SET(&diffopts, RECURSIVE);
DIFF_OPT_CLR(&diffopts, ALLOW_EXTERNAL);
@ -1375,6 +1376,8 @@ void diff_tree_combined(const unsigned char *sha1,
paths = paths->next;
free(tmp);
}
diff_tree_release_paths(&diffopts);
}
void diff_tree_combined_merge(const struct commit *commit, int dense,