Commit 6275c91
revision: convert to using diff_tree_sha1()
Since diff_tree_sha1() can now accept empty trees via NULL sha1, we
could just call it without manually reading trees into tree_desc and
duplicating code.
Besides, that
if (!tree)
return 0;
looked suspect - we were saying an invalid tree != empty tree, but maybe it is
better to just say the tree is invalid here, which is what diff_tree_sha1()
does for such case.
Signed-off-by: Kirill Smelkov <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent 7bc4ec0 commit 6275c91
1 file changed
+1
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
496 | 496 | | |
497 | 497 | | |
498 | 498 | | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | 499 | | |
503 | 500 | | |
504 | 501 | | |
505 | 502 | | |
506 | 503 | | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | 504 | | |
514 | 505 | | |
515 | | - | |
516 | | - | |
| 506 | + | |
517 | 507 | | |
518 | 508 | | |
519 | 509 | | |
| |||
0 commit comments