git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fast-import: use hashcmp() for SHA1 hash comparison
@ 2014-07-18 16:00 René Scharfe
  2014-07-18 18:42 ` Jonathan Nieder
  0 siblings, 1 reply; 7+ messages in thread
From: René Scharfe @ 2014-07-18 16:00 UTC (permalink / raw)
  To: Git Mailing List; +Cc: Junio C Hamano

Signed-off-by: Rene Scharfe <l.s.r@web.de>
---
 fast-import.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fast-import.c b/fast-import.c
index fa635f7..d73f58c 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -2324,7 +2324,7 @@ static void file_change_m(const char *p, struct branch *b)
 	}
 
 	/* Git does not track empty, non-toplevel directories. */
-	if (S_ISDIR(mode) && !memcmp(sha1, EMPTY_TREE_SHA1_BIN, 20) && *p) {
+	if (S_ISDIR(mode) && !hashcmp(sha1, EMPTY_TREE_SHA1_BIN) && *p) {
 		tree_content_remove(&b->branch_tree, p, NULL, 0);
 		return;
 	}
-- 
2.0.2

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

end of thread, other threads:[~2014-07-19 17:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-18 16:00 [PATCH] fast-import: use hashcmp() for SHA1 hash comparison René Scharfe
2014-07-18 18:42 ` Jonathan Nieder
2014-07-18 19:14   ` René Scharfe
2014-07-18 23:57     ` Jeff King
2014-07-19 12:11       ` René Scharfe
2014-07-19 16:43         ` brian m. carlson
2014-07-19 17:53           ` René Scharfe

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).