@@ -495,7 +495,7 @@ static int batch_unordered_packed(const struct object_id *oid,
return batch_unordered_object(oid, data);
}
-static int batch_objects(struct batch_options *opt)
+static int batch_objects(struct batch_options *batch)
{
struct strbuf input = STRBUF_INIT;
struct strbuf output = STRBUF_INIT;
@@ -503,8 +503,8 @@ static int batch_objects(struct batch_options *opt)
int save_warning;
int retval = 0;
- if (!opt->format)
- opt->format = "%(objectname) %(objecttype) %(objectsize)";
+ if (!batch->format)
+ batch->format = "%(objectname) %(objecttype) %(objectsize)";
/*
* Expand once with our special mark_query flag, which will prime the
@@ -513,20 +513,20 @@ static int batch_objects(struct batch_options *opt)
*/
memset(&data, 0, sizeof(data));
data.mark_query = 1;
- strbuf_expand(&output, opt->format, expand_format, &data);
+ strbuf_expand(&output, batch->format, expand_format, &data);
data.mark_query = 0;
strbuf_release(&output);
- if (opt->cmdmode)
+ if (batch->cmdmode)
data.split_on_whitespace = 1;
/*
* If we are printing out the object, then always fill in the type,
* since we will want to decide whether or not to stream.
*/
- if (opt->print_contents)
+ if (batch->print_contents)
data.info.typep = &data.type;
- if (opt->all_objects) {
+ if (batch->all_objects) {
struct object_cb_data cb;
struct object_info empty = OBJECT_INFO_INIT;
@@ -536,11 +536,11 @@ static int batch_objects(struct batch_options *opt)
if (has_promisor_remote())
warning("This repository uses promisor remotes. Some objects may not be loaded.");
- cb.opt = opt;
+ cb.opt = batch;
cb.expand = &data;
cb.scratch = &output;
- if (opt->unordered) {
+ if (batch->unordered) {
struct oidset seen = OIDSET_INIT;
cb.seen = &seen;
@@ -590,7 +590,7 @@ static int batch_objects(struct batch_options *opt)
data.rest = p;
}
- batch_one_object(input.buf, &output, opt, &data);
+ batch_one_object(input.buf, &output, batch, &data);
}
strbuf_release(&input);