add_branch_for_removal(): don't set "util" field of string_list entries

They were never used. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Michael Haggerty committed May 25, 2015 at 18:38 UTC e26cdf91c1a836045bcafa3f970b47c0967f3062
1 file changed +2 -5
builtin/remote.c
+2 -5
@@ -513,7 +513,6 @@ static int add_branch_for_removal(const char *refname,
513 {
514 struct branches_for_remote *branches = cb_data;
515 struct refspec refspec;
516 - struct string_list_item *item;
516 struct known_remote *kr;
517
518 memset(&refspec, 0, sizeof(refspec));
@@ -543,9 +542,7 @@ static int add_branch_for_removal(const char *refname,
542 if (flags & REF_ISSYMREF)
543 return unlink(git_path("%s", refname));
544
546 - item = string_list_append(branches->branches, refname);
547 - item->util = xmalloc(20);
548 - hashcpy(item->util, oid->hash);
545 + string_list_append(branches->branches, refname);
546
547 return 0;
548 }
@@ -828,7 +825,7 @@ static int rm(int argc, const char **argv)
825
826 if (!result)
827 result = remove_branches(&branches);
831 - string_list_clear(&branches, 1);
828 + string_list_clear(&branches, 0);
829
830 if (skipped.nr) {
831 fprintf_ln(stderr,