git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 1/3] fetch-pack: rename helper to create_promisor_file()

From
Christian Couder <christian.couder@gmail.com>
Date
Jan 14, 2021, 15:50 UTC
Message-ID
<20210114155016.3005932-2-chriscool@tuxfamily.org>
In-Reply-To
<20210114155016.3005932-1-chriscool@tuxfamily.org>

As we are going to refactor the code that actually writes the promisor file into a separate function in a following commit, let's rename the current write_promisor_file() function to create_promisor_file().

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
 fetch-pack.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/fetch-pack.c b/fetch-pack.c
index 876f90c759..c5fa4992a6 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -772,8 +772,8 @@ static int sideband_demux(int in, int out, void *data)
 	return ret;
 }
 
-static void write_promisor_file(const char *keep_name,
-				struct ref **sought, int nr_sought)
+static void create_promisor_file(const char *keep_name,
+				 struct ref **sought, int nr_sought)
 {
 	struct strbuf promisor_name = STRBUF_INIT;
 	int suffix_stripped;
@@ -875,7 +875,7 @@ static int get_pack(struct fetch_pack_args *args,
 
 		if (args->from_promisor)
 			/*
-			 * write_promisor_file() may be called afterwards but
+			 * create_promisor_file() may be called afterwards but
 			 * we still need index-pack to know that this is a
 			 * promisor pack. For example, if transfer.fsckobjects
 			 * is true, index-pack needs to know that .gitmodules
@@ -943,7 +943,7 @@ static int get_pack(struct fetch_pack_args *args,
 	 * obtained .keep filename if necessary
 	 */
 	if (do_keep && pack_lockfiles && pack_lockfiles->nr && args->from_promisor)
-		write_promisor_file(pack_lockfiles->items[0].string, sought, nr_sought);
+		create_promisor_file(pack_lockfiles->items[0].string, sought, nr_sought);
 
 	return 0;
 }
-- 
2.30.0.83.g36fd80b35a.dirty
Previous: Christian CouderNext: Christian Couder
Message 2 of 6 in “Refactor writing promisor file”
  1. 0/3 Refactor writing promisor fileChristian Couder, Jan 14, 2021
  2. 1/3 fetch-pack: rename helper to create_promisor_file()Christian Couder, Jan 14, 2021
  3. 2/3 fetch-pack: refactor writing promisor fileChristian Couder, Jan 14, 2021
  4. 3/3 pack-write: die on error in write_promisor_file()Christian Couder, Jan 14, 2021
  5. Taylor BlauJan 14, 2021
  6. Jeff KingJan 14, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.