Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'pack-write.c')
-rw-r--r--pack-write.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/pack-write.c b/pack-write.c
index 3513665e1e..db3ff9980f 100644
--- a/pack-write.c
+++ b/pack-write.c
@@ -1,6 +1,7 @@
#include "cache.h"
#include "pack.h"
#include "csum-file.h"
+#include "remote.h"
void reset_pack_idx_option(struct pack_idx_option *opts)
{
@@ -367,3 +368,14 @@ void finish_tmp_packfile(struct strbuf *name_buffer,
free((void *)idx_tmp_name);
}
+
+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);
+}