summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2014-11-25 08:02:33 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-11-25 18:10:31 (GMT)
commitfcce0da9750345d3f327ef4767cf2e166e40ce12 (patch)
treeb5afbfc69c4abccdc7bee8e368f462b6ca3591eb
parent4a45b2f347245d321bf5c07fbe3f8091d122732f (diff)
downloadgit-fcce0da9750345d3f327ef4767cf2e166e40ce12.zip
git-fcce0da9750345d3f327ef4767cf2e166e40ce12.tar.gz
git-fcce0da9750345d3f327ef4767cf2e166e40ce12.tar.bz2
prune_remote(): rename local variable
Rename "delete_refs_list" to "refs_to_prune". The new name is more self-explanatory. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--builtin/remote.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/builtin/remote.c b/builtin/remote.c
index 63a6709..efbf5fb 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -1311,7 +1311,7 @@ static int prune_remote(const char *remote, int dry_run)
{
int result = 0, i;
struct ref_states states;
- struct string_list delete_refs_list = STRING_LIST_INIT_NODUP;
+ struct string_list refs_to_prune = STRING_LIST_INIT_NODUP;
const char *dangling_msg = dry_run
? _(" %s will become dangling!")
: _(" %s has become dangling!");
@@ -1333,13 +1333,13 @@ static int prune_remote(const char *remote, int dry_run)
for (i = 0; i < states.stale.nr; i++) {
const char *refname = states.stale.items[i].util;
- string_list_append(&delete_refs_list, refname);
+ string_list_append(&refs_to_prune, refname);
}
- sort_string_list(&delete_refs_list);
+ sort_string_list(&refs_to_prune);
if (!dry_run) {
struct strbuf err = STRBUF_INIT;
- if (repack_without_refs(&delete_refs_list, &err))
+ if (repack_without_refs(&refs_to_prune, &err))
result |= error("%s", err.buf);
strbuf_release(&err);
}
@@ -1358,9 +1358,9 @@ static int prune_remote(const char *remote, int dry_run)
abbrev_ref(refname, "refs/remotes/"));
}
- warn_dangling_symrefs(stdout, dangling_msg, &delete_refs_list);
+ warn_dangling_symrefs(stdout, dangling_msg, &refs_to_prune);
- string_list_clear(&delete_refs_list, 0);
+ string_list_clear(&refs_to_prune, 0);
free_remote_ref_states(&states);
return result;
}