Thread (1 message) 1 message, 1 author, 2021-01-12

Re: [PATCH 2/2] fetch-pack: refactor writing promisor file

From: Junio C Hamano <hidden>
Date: 2021-01-12 21:41:06

Christian Couder [off-list ref] writes:
+void write_promisor_file(const char *promisor_name, struct ref **sought, int nr_sought)
+{
+	int i;
+	FILE *output = xfopen(promisor_name, "w");
+
+	for (i = 0; i < nr_sought; i++)
+		fprintf(output, "%s %s\n", oid_to_hex(&sought[i]->old_oid),
+			sought[i]->name);
+	fclose(output);
+}
Ah, nevermind.  This has its output format baked into the code and
it wants to show object name and which ref it is on, so as long as
we are happy with the format (do we read the contents and use it in
any way, by the way?), it is reasonable to expect any new caller to
have "struct ref" or an array of it.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help