2382
struct string_list *affected_refnames,
2383
struct strbuf *err)
2384
{
2385
- struct string_list_item *item;
2385
struct ref_update *new_update;
2386
2387
if ((update->flags & REF_LOG_ONLY) ||
2420
*/
2421
if (strcmp(new_update->refname, "HEAD"))
2422
BUG("%s unexpectedly not 'HEAD'", new_update->refname);
2424
- item = string_list_insert(affected_refnames, new_update->refname);
2425
- item->util = new_update;
2423
+ string_list_insert(affected_refnames, new_update->refname);
2424
2425
return 0;
2426
}
2439
struct string_list *affected_refnames,
2440
struct strbuf *err)
2441
{
2444
- struct string_list_item *item;
2442
struct ref_update *new_update;
2443
unsigned int new_flags;
2444
2493
* be valid as long as affected_refnames is in use, and NOT
2494
* referent, which might soon be freed by our caller.
2495
*/
2499
- item = string_list_insert(affected_refnames, new_update->refname);
2500
- if (item->util)
2501
- BUG("%s unexpectedly found in affected_refnames",
2502
- new_update->refname);
2503
- item->util = new_update;
2496
+ string_list_insert(affected_refnames, new_update->refname);
2497
2498
return 0;
2499
}
2827
*/
2828
for (i = 0; i < transaction->nr; i++) {
2829
struct ref_update *update = transaction->updates[i];
2837
- struct string_list_item *item;
2830
2831
if ((update->flags & REF_IS_PRUNING) &&
2832
!(update->flags & REF_NO_DEREF))
2835
if (update->flags & REF_LOG_ONLY)
2836
continue;
2837
2846
- item = string_list_append(&affected_refnames, update->refname);
2847
- /*
2848
- * We store a pointer to update in item->util, but at
2849
- * the moment we never use the value of this field
2850
- * except to check whether it is non-NULL.
2851
- */
2852
- item->util = update;
2838
+ string_list_append(&affected_refnames, update->refname);
2839
}
2840
string_list_sort(&affected_refnames);
2841
if (ref_update_reject_duplicates(&affected_refnames, err)) {