git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Make rev_compare_tree less confusing.
@ 2010-04-15  8:46 Bo Yang
  2010-04-16  9:31 ` Thomas Rast
  0 siblings, 1 reply; 3+ messages in thread
From: Bo Yang @ 2010-04-15  8:46 UTC (permalink / raw)
  To: git; +Cc: gitster, trast

diff_tree_sha1 always return 0, so comparing the return value
of it make no sense. Just delete the comparison to make code
reader clear.

Signed-off-by: Bo Yang <struggleyb.nku@gmail.com>
---
 revision.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/revision.c b/revision.c
index f4b8b38..8caca99 100644
--- a/revision.c
+++ b/revision.c
@@ -329,9 +329,7 @@ static int rev_compare_tree(struct rev_info *revs, struct commit *parent, struct
 
 	tree_difference = REV_TREE_SAME;
 	DIFF_OPT_CLR(&revs->pruning, HAS_CHANGES);
-	if (diff_tree_sha1(t1->object.sha1, t2->object.sha1, "",
-			   &revs->pruning) < 0)
-		return REV_TREE_DIFFERENT;
+	diff_tree_sha1(t1->object.sha1, t2->object.sha1, "", &revs->pruning);
 	return tree_difference;
 }
 
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-04-16 20:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-15  8:46 [PATCH] Make rev_compare_tree less confusing Bo Yang
2010-04-16  9:31 ` Thomas Rast
2010-04-16 20:23   ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).