]>
Commit | Line | Data |
---|---|---|
d6b64ed0 | 1 | #include "builtin.h" |
bd321bcc | 2 | #include "cache.h" |
109cd76d | 3 | #include "repository.h" |
b2141fc1 | 4 | #include "config.h" |
bd321bcc JS |
5 | #include "commit.h" |
6 | #include "tag.h" | |
7 | #include "refs.h" | |
edefb1a2 | 8 | #include "parse-options.h" |
b23e0b93 | 9 | #include "sha1-lookup.h" |
8fd79a73 | 10 | #include "commit-slab.h" |
bd321bcc | 11 | |
c075aea5 JH |
12 | #define CUTOFF_DATE_SLOP 86400 /* one day */ |
13 | ||
bd321bcc JS |
14 | typedef struct rev_name { |
15 | const char *tip_name; | |
dddbad72 | 16 | timestamp_t taggerdate; |
bd321bcc | 17 | int generation; |
ac076c29 | 18 | int distance; |
ef1e7406 | 19 | int from_tag; |
bd321bcc JS |
20 | } rev_name; |
21 | ||
8fd79a73 NTND |
22 | define_commit_slab(commit_rev_name, struct rev_name *); |
23 | ||
5589e87f | 24 | static timestamp_t cutoff = TIME_MAX; |
8fd79a73 | 25 | static struct commit_rev_name rev_names; |
bd321bcc | 26 | |
ac076c29 JS |
27 | /* How many generations are maximally preferred over _one_ merge traversal? */ |
28 | #define MERGE_TRAVERSAL_WEIGHT 65535 | |
29 | ||
8fd79a73 NTND |
30 | static struct rev_name *get_commit_rev_name(struct commit *commit) |
31 | { | |
32 | struct rev_name **slot = commit_rev_name_peek(&rev_names, commit); | |
33 | ||
34 | return slot ? *slot : NULL; | |
35 | } | |
36 | ||
37 | static void set_commit_rev_name(struct commit *commit, struct rev_name *name) | |
38 | { | |
39 | *commit_rev_name_at(&rev_names, commit) = name; | |
40 | } | |
41 | ||
0041bf65 JH |
42 | static int is_better_name(struct rev_name *name, |
43 | const char *tip_name, | |
78089b71 | 44 | timestamp_t taggerdate, |
0041bf65 | 45 | int generation, |
ef1e7406 JH |
46 | int distance, |
47 | int from_tag) | |
0041bf65 | 48 | { |
ef1e7406 JH |
49 | /* |
50 | * When comparing names based on tags, prefer names | |
51 | * based on the older tag, even if it is farther away. | |
52 | */ | |
53 | if (from_tag && name->from_tag) | |
54 | return (name->taggerdate > taggerdate || | |
55 | (name->taggerdate == taggerdate && | |
56 | name->distance > distance)); | |
57 | ||
58 | /* | |
59 | * We know that at least one of them is a non-tag at this point. | |
60 | * favor a tag over a non-tag. | |
61 | */ | |
62 | if (name->from_tag != from_tag) | |
63 | return from_tag; | |
64 | ||
65 | /* | |
66 | * We are now looking at two non-tags. Tiebreak to favor | |
67 | * shorter hops. | |
68 | */ | |
69 | if (name->distance != distance) | |
70 | return name->distance > distance; | |
71 | ||
72 | /* ... or tiebreak to favor older date */ | |
73 | if (name->taggerdate != taggerdate) | |
74 | return name->taggerdate > taggerdate; | |
75 | ||
76 | /* keep the current one if we cannot decide */ | |
77 | return 0; | |
0041bf65 JH |
78 | } |
79 | ||
bd321bcc | 80 | static void name_rev(struct commit *commit, |
dddbad72 | 81 | const char *tip_name, timestamp_t taggerdate, |
ef1e7406 | 82 | int generation, int distance, int from_tag, |
bd321bcc JS |
83 | int deref) |
84 | { | |
8fd79a73 | 85 | struct rev_name *name = get_commit_rev_name(commit); |
bd321bcc | 86 | struct commit_list *parents; |
f2e6f1c9 | 87 | int parent_number = 1; |
53082246 | 88 | char *to_free = NULL; |
bd321bcc | 89 | |
0064053b | 90 | parse_commit(commit); |
bd321bcc JS |
91 | |
92 | if (commit->date < cutoff) | |
93 | return; | |
94 | ||
95 | if (deref) { | |
53082246 | 96 | tip_name = to_free = xstrfmt("%s^0", tip_name); |
bd321bcc JS |
97 | |
98 | if (generation) | |
99 | die("generation: %d, but deref?", generation); | |
100 | } | |
101 | ||
102 | if (name == NULL) { | |
103 | name = xmalloc(sizeof(rev_name)); | |
8fd79a73 | 104 | set_commit_rev_name(commit, name); |
bd321bcc | 105 | goto copy_data; |
0041bf65 | 106 | } else if (is_better_name(name, tip_name, taggerdate, |
ef1e7406 | 107 | generation, distance, from_tag)) { |
bd321bcc JS |
108 | copy_data: |
109 | name->tip_name = tip_name; | |
75504248 | 110 | name->taggerdate = taggerdate; |
bd321bcc | 111 | name->generation = generation; |
ac076c29 | 112 | name->distance = distance; |
ef1e7406 | 113 | name->from_tag = from_tag; |
53082246 JS |
114 | } else { |
115 | free(to_free); | |
bd321bcc | 116 | return; |
53082246 | 117 | } |
bd321bcc JS |
118 | |
119 | for (parents = commit->parents; | |
120 | parents; | |
121 | parents = parents->next, parent_number++) { | |
f2e6f1c9 | 122 | if (parent_number > 1) { |
34e02deb | 123 | size_t len; |
75faa45a | 124 | char *new_name; |
bd321bcc | 125 | |
34e02deb | 126 | strip_suffix(tip_name, "^0", &len); |
bd321bcc | 127 | if (generation > 0) |
34e02deb | 128 | new_name = xstrfmt("%.*s~%d^%d", (int)len, tip_name, |
75faa45a | 129 | generation, parent_number); |
bd321bcc | 130 | else |
34e02deb | 131 | new_name = xstrfmt("%.*s^%d", (int)len, tip_name, |
75faa45a | 132 | parent_number); |
bd321bcc | 133 | |
75504248 | 134 | name_rev(parents->item, new_name, taggerdate, 0, |
ef1e7406 JH |
135 | distance + MERGE_TRAVERSAL_WEIGHT, |
136 | from_tag, 0); | |
bd321bcc | 137 | } else { |
75504248 | 138 | name_rev(parents->item, tip_name, taggerdate, |
ef1e7406 JH |
139 | generation + 1, distance + 1, |
140 | from_tag, 0); | |
bd321bcc JS |
141 | } |
142 | } | |
143 | } | |
144 | ||
98c5c4ad NK |
145 | static int subpath_matches(const char *path, const char *filter) |
146 | { | |
147 | const char *subpath = path; | |
148 | ||
149 | while (subpath) { | |
55d34269 | 150 | if (!wildmatch(filter, subpath, 0)) |
98c5c4ad NK |
151 | return subpath - path; |
152 | subpath = strchr(subpath, '/'); | |
153 | if (subpath) | |
154 | subpath++; | |
155 | } | |
156 | return -1; | |
157 | } | |
158 | ||
9608a190 JH |
159 | static const char *name_ref_abbrev(const char *refname, int shorten_unambiguous) |
160 | { | |
161 | if (shorten_unambiguous) | |
162 | refname = shorten_unambiguous_ref(refname, 0); | |
59556548 | 163 | else if (starts_with(refname, "refs/heads/")) |
9608a190 | 164 | refname = refname + 11; |
59556548 | 165 | else if (starts_with(refname, "refs/")) |
9608a190 JH |
166 | refname = refname + 5; |
167 | return refname; | |
168 | } | |
169 | ||
2afc29aa JS |
170 | struct name_ref_data { |
171 | int tags_only; | |
23615708 | 172 | int name_only; |
290be667 | 173 | struct string_list ref_filters; |
96415b49 | 174 | struct string_list exclude_filters; |
2afc29aa JS |
175 | }; |
176 | ||
b23e0b93 JH |
177 | static struct tip_table { |
178 | struct tip_table_entry { | |
511dca80 | 179 | struct object_id oid; |
b23e0b93 JH |
180 | const char *refname; |
181 | } *table; | |
182 | int nr; | |
183 | int alloc; | |
184 | int sorted; | |
185 | } tip_table; | |
186 | ||
511dca80 | 187 | static void add_to_tip_table(const struct object_id *oid, const char *refname, |
b23e0b93 JH |
188 | int shorten_unambiguous) |
189 | { | |
190 | refname = name_ref_abbrev(refname, shorten_unambiguous); | |
191 | ||
192 | ALLOC_GROW(tip_table.table, tip_table.nr + 1, tip_table.alloc); | |
511dca80 | 193 | oidcpy(&tip_table.table[tip_table.nr].oid, oid); |
b23e0b93 JH |
194 | tip_table.table[tip_table.nr].refname = xstrdup(refname); |
195 | tip_table.nr++; | |
196 | tip_table.sorted = 0; | |
197 | } | |
198 | ||
199 | static int tipcmp(const void *a_, const void *b_) | |
200 | { | |
201 | const struct tip_table_entry *a = a_, *b = b_; | |
511dca80 | 202 | return oidcmp(&a->oid, &b->oid); |
b23e0b93 JH |
203 | } |
204 | ||
73868486 | 205 | static int name_ref(const char *path, const struct object_id *oid, int flags, void *cb_data) |
bd321bcc | 206 | { |
109cd76d | 207 | struct object *o = parse_object(the_repository, oid); |
2afc29aa | 208 | struct name_ref_data *data = cb_data; |
98c5c4ad | 209 | int can_abbreviate_output = data->tags_only && data->name_only; |
bd321bcc | 210 | int deref = 0; |
dddbad72 | 211 | timestamp_t taggerdate = TIME_MAX; |
bd321bcc | 212 | |
59556548 | 213 | if (data->tags_only && !starts_with(path, "refs/tags/")) |
2afc29aa JS |
214 | return 0; |
215 | ||
96415b49 JK |
216 | if (data->exclude_filters.nr) { |
217 | struct string_list_item *item; | |
218 | ||
219 | for_each_string_list_item(item, &data->exclude_filters) { | |
220 | if (subpath_matches(path, item->string) >= 0) | |
221 | return 0; | |
222 | } | |
223 | } | |
224 | ||
290be667 JK |
225 | if (data->ref_filters.nr) { |
226 | struct string_list_item *item; | |
227 | int matched = 0; | |
228 | ||
229 | /* See if any of the patterns match. */ | |
230 | for_each_string_list_item(item, &data->ref_filters) { | |
231 | /* | |
232 | * Check all patterns even after finding a match, so | |
233 | * that we can see if a match with a subpath exists. | |
234 | * When a user asked for 'refs/tags/v*' and 'v1.*', | |
235 | * both of which match, the user is showing her | |
236 | * willingness to accept a shortened output by having | |
237 | * the 'v1.*' in the acceptable refnames, so we | |
238 | * shouldn't stop when seeing 'refs/tags/v1.4' matches | |
239 | * 'refs/tags/v*'. We should show it as 'v1.4'. | |
240 | */ | |
241 | switch (subpath_matches(path, item->string)) { | |
242 | case -1: /* did not match */ | |
243 | break; | |
244 | case 0: /* matched fully */ | |
245 | matched = 1; | |
246 | break; | |
247 | default: /* matched subpath */ | |
248 | matched = 1; | |
249 | can_abbreviate_output = 1; | |
250 | break; | |
251 | } | |
98c5c4ad | 252 | } |
290be667 JK |
253 | |
254 | /* If none of the patterns matched, stop now */ | |
255 | if (!matched) | |
256 | return 0; | |
98c5c4ad | 257 | } |
bd321bcc | 258 | |
511dca80 | 259 | add_to_tip_table(oid, path, can_abbreviate_output); |
b23e0b93 | 260 | |
1974632c | 261 | while (o && o->type == OBJ_TAG) { |
bd321bcc JS |
262 | struct tag *t = (struct tag *) o; |
263 | if (!t->tagged) | |
264 | break; /* broken repository */ | |
109cd76d | 265 | o = parse_object(the_repository, &t->tagged->oid); |
bd321bcc | 266 | deref = 1; |
75504248 | 267 | taggerdate = t->date; |
bd321bcc | 268 | } |
1974632c | 269 | if (o && o->type == OBJ_COMMIT) { |
bd321bcc | 270 | struct commit *commit = (struct commit *)o; |
ef1e7406 | 271 | int from_tag = starts_with(path, "refs/tags/"); |
bd321bcc | 272 | |
5554451d | 273 | if (taggerdate == TIME_MAX) |
ef1e7406 | 274 | taggerdate = ((struct commit *)o)->date; |
9608a190 | 275 | path = name_ref_abbrev(path, can_abbreviate_output); |
ef1e7406 JH |
276 | name_rev(commit, xstrdup(path), taggerdate, 0, 0, |
277 | from_tag, deref); | |
bd321bcc JS |
278 | } |
279 | return 0; | |
280 | } | |
281 | ||
b23e0b93 JH |
282 | static const unsigned char *nth_tip_table_ent(size_t ix, void *table_) |
283 | { | |
284 | struct tip_table_entry *table = table_; | |
511dca80 | 285 | return table[ix].oid.hash; |
b23e0b93 JH |
286 | } |
287 | ||
288 | static const char *get_exact_ref_match(const struct object *o) | |
289 | { | |
290 | int found; | |
291 | ||
292 | if (!tip_table.table || !tip_table.nr) | |
293 | return NULL; | |
294 | ||
295 | if (!tip_table.sorted) { | |
9ed0d8d6 | 296 | QSORT(tip_table.table, tip_table.nr, tipcmp); |
b23e0b93 JH |
297 | tip_table.sorted = 1; |
298 | } | |
299 | ||
ed1c9977 | 300 | found = sha1_pos(o->oid.hash, tip_table.table, tip_table.nr, |
b23e0b93 JH |
301 | nth_tip_table_ent); |
302 | if (0 <= found) | |
303 | return tip_table.table[found].refname; | |
304 | return NULL; | |
305 | } | |
306 | ||
903fc7da JK |
307 | /* may return a constant string or use "buf" as scratch space */ |
308 | static const char *get_rev_name(const struct object *o, struct strbuf *buf) | |
bd321bcc | 309 | { |
d3ff6f55 LT |
310 | struct rev_name *n; |
311 | struct commit *c; | |
312 | ||
1974632c | 313 | if (o->type != OBJ_COMMIT) |
b23e0b93 | 314 | return get_exact_ref_match(o); |
d3ff6f55 | 315 | c = (struct commit *) o; |
8fd79a73 | 316 | n = get_commit_rev_name(c); |
bd321bcc | 317 | if (!n) |
a2cf9f44 | 318 | return NULL; |
bd321bcc JS |
319 | |
320 | if (!n->generation) | |
321 | return n->tip_name; | |
59d3f541 JS |
322 | else { |
323 | int len = strlen(n->tip_name); | |
324 | if (len > 2 && !strcmp(n->tip_name + len - 2, "^0")) | |
325 | len -= 2; | |
903fc7da JK |
326 | strbuf_reset(buf); |
327 | strbuf_addf(buf, "%.*s~%d", len, n->tip_name, n->generation); | |
328 | return buf->buf; | |
59d3f541 | 329 | } |
bd321bcc | 330 | } |
1f1e895f | 331 | |
da2478db JH |
332 | static void show_name(const struct object *obj, |
333 | const char *caller_name, | |
334 | int always, int allow_undefined, int name_only) | |
335 | { | |
336 | const char *name; | |
f2fd0760 | 337 | const struct object_id *oid = &obj->oid; |
903fc7da | 338 | struct strbuf buf = STRBUF_INIT; |
da2478db JH |
339 | |
340 | if (!name_only) | |
f2fd0760 | 341 | printf("%s ", caller_name ? caller_name : oid_to_hex(oid)); |
903fc7da | 342 | name = get_rev_name(obj, &buf); |
da2478db JH |
343 | if (name) |
344 | printf("%s\n", name); | |
345 | else if (allow_undefined) | |
346 | printf("undefined\n"); | |
347 | else if (always) | |
aab9583f | 348 | printf("%s\n", find_unique_abbrev(oid, DEFAULT_ABBREV)); |
da2478db | 349 | else |
f2fd0760 | 350 | die("cannot describe '%s'", oid_to_hex(oid)); |
903fc7da | 351 | strbuf_release(&buf); |
da2478db JH |
352 | } |
353 | ||
edefb1a2 | 354 | static char const * const name_rev_usage[] = { |
9c9b4f2f AH |
355 | N_("git name-rev [<options>] <commit>..."), |
356 | N_("git name-rev [<options>] --all"), | |
357 | N_("git name-rev [<options>] --stdin"), | |
edefb1a2 PH |
358 | NULL |
359 | }; | |
360 | ||
e8b55fab JH |
361 | static void name_rev_line(char *p, struct name_ref_data *data) |
362 | { | |
903fc7da | 363 | struct strbuf buf = STRBUF_INIT; |
e8b55fab JH |
364 | int forty = 0; |
365 | char *p_start; | |
366 | for (p_start = p; *p; p++) { | |
367 | #define ishex(x) (isdigit((x)) || ((x) >= 'a' && (x) <= 'f')) | |
368 | if (!ishex(*p)) | |
369 | forty = 0; | |
511dca80 | 370 | else if (++forty == GIT_SHA1_HEXSZ && |
e8b55fab | 371 | !ishex(*(p+1))) { |
511dca80 | 372 | struct object_id oid; |
e8b55fab JH |
373 | const char *name = NULL; |
374 | char c = *(p+1); | |
7c5b1675 | 375 | int p_len = p - p_start + 1; |
e8b55fab JH |
376 | |
377 | forty = 0; | |
378 | ||
379 | *(p+1) = 0; | |
511dca80 | 380 | if (!get_oid(p - (GIT_SHA1_HEXSZ - 1), &oid)) { |
e8b55fab | 381 | struct object *o = |
5abddd1e SB |
382 | lookup_object(the_repository, |
383 | oid.hash); | |
e8b55fab | 384 | if (o) |
903fc7da | 385 | name = get_rev_name(o, &buf); |
e8b55fab JH |
386 | } |
387 | *(p+1) = c; | |
388 | ||
389 | if (!name) | |
390 | continue; | |
391 | ||
7c5b1675 | 392 | if (data->name_only) |
511dca80 | 393 | printf("%.*s%s", p_len - GIT_SHA1_HEXSZ, p_start, name); |
7c5b1675 RS |
394 | else |
395 | printf("%.*s (%s)", p_len, p_start, name); | |
e8b55fab JH |
396 | p_start = p + 1; |
397 | } | |
398 | } | |
399 | ||
400 | /* flush */ | |
401 | if (p_start != p) | |
402 | fwrite(p_start, p - p_start, 1, stdout); | |
903fc7da JK |
403 | |
404 | strbuf_release(&buf); | |
e8b55fab JH |
405 | } |
406 | ||
d6b64ed0 | 407 | int cmd_name_rev(int argc, const char **argv, const char *prefix) |
bd321bcc | 408 | { |
3cd47459 | 409 | struct object_array revs = OBJECT_ARRAY_INIT; |
adfc1857 | 410 | int all = 0, transform_stdin = 0, allow_undefined = 1, always = 0, peel_tag = 0; |
96415b49 | 411 | struct name_ref_data data = { 0, 0, STRING_LIST_INIT_NODUP, STRING_LIST_INIT_NODUP }; |
edefb1a2 | 412 | struct option opts[] = { |
d5d09d47 SB |
413 | OPT_BOOL(0, "name-only", &data.name_only, N_("print only names (no SHA-1)")), |
414 | OPT_BOOL(0, "tags", &data.tags_only, N_("only use tags to name the commits")), | |
290be667 | 415 | OPT_STRING_LIST(0, "refs", &data.ref_filters, N_("pattern"), |
422cad0a | 416 | N_("only use refs matching <pattern>")), |
96415b49 JK |
417 | OPT_STRING_LIST(0, "exclude", &data.exclude_filters, N_("pattern"), |
418 | N_("ignore refs matching <pattern>")), | |
edefb1a2 | 419 | OPT_GROUP(""), |
d5d09d47 SB |
420 | OPT_BOOL(0, "all", &all, N_("list all commits reachable from all refs")), |
421 | OPT_BOOL(0, "stdin", &transform_stdin, N_("read from stdin")), | |
422 | OPT_BOOL(0, "undefined", &allow_undefined, N_("allow to print `undefined` names (default)")), | |
423 | OPT_BOOL(0, "always", &always, | |
422cad0a | 424 | N_("show abbreviated commit object as fallback")), |
adfc1857 JH |
425 | { |
426 | /* A Hidden OPT_BOOL */ | |
427 | OPTION_SET_INT, 0, "peel-tag", &peel_tag, NULL, | |
428 | N_("dereference tags in the input (internal use)"), | |
429 | PARSE_OPT_NOARG | PARSE_OPT_HIDDEN, NULL, 1, | |
430 | }, | |
edefb1a2 PH |
431 | OPT_END(), |
432 | }; | |
bd321bcc | 433 | |
8fd79a73 | 434 | init_commit_rev_name(&rev_names); |
ef90d6d4 | 435 | git_config(git_default_config, NULL); |
37782920 | 436 | argc = parse_options(argc, argv, prefix, opts, name_rev_usage, 0); |
05efb7b7 | 437 | if (all + transform_stdin + !!argc > 1) { |
edefb1a2 PH |
438 | error("Specify either a list, or --all, not both!"); |
439 | usage_with_options(name_rev_usage, opts); | |
440 | } | |
441 | if (all || transform_stdin) | |
442 | cutoff = 0; | |
bd321bcc | 443 | |
edefb1a2 | 444 | for (; argc; argc--, argv++) { |
511dca80 | 445 | struct object_id oid; |
118aa4ac | 446 | struct object *object; |
bd321bcc JS |
447 | struct commit *commit; |
448 | ||
511dca80 | 449 | if (get_oid(*argv, &oid)) { |
bd321bcc JS |
450 | fprintf(stderr, "Could not get sha1 for %s. Skipping.\n", |
451 | *argv); | |
452 | continue; | |
453 | } | |
454 | ||
118aa4ac | 455 | commit = NULL; |
109cd76d | 456 | object = parse_object(the_repository, &oid); |
118aa4ac | 457 | if (object) { |
a74093da SB |
458 | struct object *peeled = deref_tag(the_repository, |
459 | object, *argv, 0); | |
118aa4ac JH |
460 | if (peeled && peeled->type == OBJ_COMMIT) |
461 | commit = (struct commit *)peeled; | |
462 | } | |
463 | ||
464 | if (!object) { | |
465 | fprintf(stderr, "Could not get object for %s. Skipping.\n", | |
bd321bcc JS |
466 | *argv); |
467 | continue; | |
468 | } | |
469 | ||
118aa4ac JH |
470 | if (commit) { |
471 | if (cutoff > commit->date) | |
472 | cutoff = commit->date; | |
473 | } | |
adfc1857 JH |
474 | |
475 | if (peel_tag) { | |
476 | if (!commit) { | |
477 | fprintf(stderr, "Could not get commit for %s. Skipping.\n", | |
478 | *argv); | |
479 | continue; | |
480 | } | |
481 | object = (struct object *)commit; | |
482 | } | |
118aa4ac | 483 | add_object_array(object, *argv, &revs); |
bd321bcc JS |
484 | } |
485 | ||
c075aea5 JH |
486 | if (cutoff) |
487 | cutoff = cutoff - CUTOFF_DATE_SLOP; | |
73868486 | 488 | for_each_ref(name_ref, &data); |
bd321bcc JS |
489 | |
490 | if (transform_stdin) { | |
491 | char buffer[2048]; | |
bd321bcc JS |
492 | |
493 | while (!feof(stdin)) { | |
e8b55fab | 494 | char *p = fgets(buffer, sizeof(buffer), stdin); |
bd321bcc JS |
495 | if (!p) |
496 | break; | |
e8b55fab | 497 | name_rev_line(p, &data); |
bd321bcc JS |
498 | } |
499 | } else if (all) { | |
fc046a75 | 500 | int i, max; |
bd321bcc | 501 | |
fc046a75 | 502 | max = get_max_object_index(); |
a83123de BS |
503 | for (i = 0; i < max; i++) { |
504 | struct object *obj = get_indexed_object(i); | |
e8b14d7e | 505 | if (!obj || obj->type != OBJ_COMMIT) |
a83123de BS |
506 | continue; |
507 | show_name(obj, NULL, | |
da2478db | 508 | always, allow_undefined, data.name_only); |
a83123de | 509 | } |
1f1e895f LT |
510 | } else { |
511 | int i; | |
da2478db JH |
512 | for (i = 0; i < revs.nr; i++) |
513 | show_name(revs.objects[i].item, revs.objects[i].name, | |
514 | always, allow_undefined, data.name_only); | |
1f1e895f | 515 | } |
bd321bcc | 516 | |
886e1084 | 517 | UNLEAK(revs); |
bd321bcc JS |
518 | return 0; |
519 | } |