Thread (81 messages) 81 messages, 7 authors, 2018-07-22

Re: [PATCH v5 3/8] block alloc: add lifecycle APIs for cache_entry structs

From: SZEDER Gábor <hidden>
Date: 2018-06-28 22:28:15

quoted hunk ↗ jump to hunk
diff --git a/read-cache.c b/read-cache.c
index 9624ce1784..116fd51680 100644
--- a/read-cache.c
+++ b/read-cache.c
+struct cache_entry *make_transient_cache_entry(unsigned int mode, const struct object_id *oid,
+					       const char *path, int stage)
+{
+	struct cache_entry *ce;
+	int len;
+
+	if (!verify_path(path, mode)) {
+		error("Invalid path '%s'", path);
+		return NULL;
+	}
+
+	len = strlen(path);
+	ce = make_empty_transient_cache_entry(len);
+
+	hashcpy(ce->oid.hash, oid->hash);
Please use oidcpy() here, too.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help