Skip to contentSkip to conversation

for-each-ref: remove unused variable

PATCH In review Ramkumar Ramachandra 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 for-each-ref: remove unused variable

---
 builtin/for-each-ref.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
builtin/for-each-ref.c +1 -2
index 6551e7b..51798b4 100644
@@ -92,7 +92,7 @@ static struct {
  */
 static const char **used_atom;
 static cmp_type *used_atom_type;
-static int used_atom_cnt, sort_atom_limit, need_tagged, need_symref;
+static int used_atom_cnt, need_tagged, need_symref;
 static int need_color_reset_at_eol;
 
 /*
@@ -1105,7 +1105,6 @@ int cmd_for_each_ref(int argc, const char **argv, const char *prefix)
 
 	if (!sort)
 		sort = default_sort();
-	sort_atom_limit = used_atom_cnt;
 
 	/* for warn_ambiguous_refs */
 	git_config(git_default_config, NULL);
Signature · 1 line
1.8.5.2.227.g53f3478
#1 lore raw
Quoted 2 lines · Ramkumar Ramachandra

---

Interesting. As far as I can tell, no code ever used this symbol since the command was introduced at 9f613ddd (Add git-for-each-ref:
helper for language bindings, 2006-09-15).

Quoted 24 lines
 builtin/for-each-ref.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
builtin/for-each-ref.c +1 -2
index 6551e7b..51798b4 100644
@@ -92,7 +92,7 @@ static struct {
  */
 static const char **used_atom;
 static cmp_type *used_atom_type;
-static int used_atom_cnt, sort_atom_limit, need_tagged, need_symref;
+static int used_atom_cnt, need_tagged, need_symref;
 static int need_color_reset_at_eol;
 
 /*
@@ -1105,7 +1105,6 @@ int cmd_for_each_ref(int argc, const char **argv, const char *prefix)
 
 	if (!sort)
 		sort = default_sort();
-	sort_atom_limit = used_atom_cnt;
 
 	/* for warn_ambiguous_refs */
 	git_config(git_default_config, NULL);