Thread (58 messages) flat view 58 messages, 2 authors, 2016-06-15
STALE3755d

Revision v3 of 3 in this series.

Revisions (3)
  1. v1 [diff vs current]
  2. v2 [diff vs current]
  3. v3 current

[PATCH v3 16/56] add_branch_for_removal(): don't set "util" field of string_list entries

From: brian m. carlson <hidden>
Date: 2016-06-15 23:04:55
Subsystem: the rest · Maintainer: Linus Torvalds

From: Michael Haggerty <redacted>

They were never used.

Signed-off-by: Michael Haggerty <redacted>
Signed-off-by: brian m. carlson <redacted>
---
 builtin/remote.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/builtin/remote.c b/builtin/remote.c
index 1986e98..ab39fea 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -513,7 +513,6 @@ static int add_branch_for_removal(const char *refname,
 {
 	struct branches_for_remote *branches = cb_data;
 	struct refspec refspec;
-	struct string_list_item *item;
 	struct known_remote *kr;
 
 	memset(&refspec, 0, sizeof(refspec));
@@ -543,9 +542,7 @@ static int add_branch_for_removal(const char *refname,
 	if (flags & REF_ISSYMREF)
 		return unlink(git_path("%s", refname));
 
-	item = string_list_append(branches->branches, refname);
-	item->util = xmalloc(20);
-	hashcpy(item->util, oid->hash);
+	string_list_append(branches->branches, refname);
 
 	return 0;
 }
@@ -828,7 +825,7 @@ static int rm(int argc, const char **argv)
 
 	if (!result)
 		result = remove_branches(&branches);
-	string_list_clear(&branches, 1);
+	string_list_clear(&branches, 0);
 
 	if (skipped.nr) {
 		fprintf_ln(stderr,
-- 
2.4.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help