author | Jonathan Nieder <jrnieder@gmail.com> | |
Tue, 16 Aug 2011 18:27:39 +0000 (13:27 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 16 Aug 2011 20:06:13 +0000 (13:06 -0700) | ||
commit | 03f622c81fed05bb571519beacb0eeaf595c65f4 | |
tree | f5a75b51e1309ec6e5ce684d6436e9d98d0c8f85 | tree | snapshot |
parent | 127f04522292fc62152762405c92d6acca4dbcb5 | commit | diff |
merge-recursive: take advantage of hardcoded empty tree
When this code was first written (v1.4.3-rc1~174^2~4, merge-recur: if
there is no common ancestor, fake empty one, 2006-08-09), everyone
needing a fake empty tree had to make her own, but ever since
v1.5.5-rc0~180^2~1 (2008-02-13), the object lookup machinery provides
a ready-made one. Use it.
This is just a simplification, though it also fixes a small leak
(since the tree in the virtual common ancestor commit is never freed).
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When this code was first written (v1.4.3-rc1~174^2~4, merge-recur: if
there is no common ancestor, fake empty one, 2006-08-09), everyone
needing a fake empty tree had to make her own, but ever since
v1.5.5-rc0~180^2~1 (2008-02-13), the object lookup machinery provides
a ready-made one. Use it.
This is just a simplification, though it also fixes a small leak
(since the tree in the virtual common ancestor commit is never freed).
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
merge-recursive.c | diff | blob | history |