@@ -709,11 +709,14 @@ static int log_tree_diff(struct rev_info *opt, struct commit *commit, struct log
709
709
{
710
710
int showed_log ;
711
711
struct commit_list * parents ;
712
- unsigned const char * sha1 = commit -> object . sha1 ;
712
+ unsigned const char * sha1 ;
713
713
714
714
if (!opt -> diff && !DIFF_OPT_TST (& opt -> diffopt , EXIT_WITH_STATUS ))
715
715
return 0 ;
716
716
717
+ parse_commit (commit );
718
+ sha1 = commit -> tree -> object .sha1 ;
719
+
717
720
/* Root commit? */
718
721
parents = commit -> parents ;
719
722
if (!parents ) {
@@ -736,7 +739,9 @@ static int log_tree_diff(struct rev_info *opt, struct commit *commit, struct log
736
739
* parent, showing summary diff of the others
737
740
* we merged _in_.
738
741
*/
739
- diff_tree_sha1 (parents -> item -> object .sha1 , sha1 , "" , & opt -> diffopt );
742
+ parse_commit (parents -> item );
743
+ diff_tree_sha1 (parents -> item -> tree -> object .sha1 ,
744
+ sha1 , "" , & opt -> diffopt );
740
745
log_tree_diff_flush (opt );
741
746
return !opt -> loginfo ;
742
747
}
@@ -749,7 +754,9 @@ static int log_tree_diff(struct rev_info *opt, struct commit *commit, struct log
749
754
for (;;) {
750
755
struct commit * parent = parents -> item ;
751
756
752
- diff_tree_sha1 (parent -> object .sha1 , sha1 , "" , & opt -> diffopt );
757
+ parse_commit (parent );
758
+ diff_tree_sha1 (parent -> tree -> object .sha1 ,
759
+ sha1 , "" , & opt -> diffopt );
753
760
log_tree_diff_flush (opt );
754
761
755
762
showed_log |= !opt -> loginfo ;
0 commit comments