summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Michael Haggerty <mhagger@alum.mit.edu>2014-11-25 09:02:33 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-11-25 10:10:31 -0800
commitfcce0da9750345d3f327ef4767cf2e166e40ce12 (patch)
treeb5afbfc69c4abccdc7bee8e368f462b6ca3591eb /builtin
parentrepack_without_refs(): make the refnames argument a string_list (diff)
downloadtgif-fcce0da9750345d3f327ef4767cf2e166e40ce12.tar.xz
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>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/remote.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/builtin/remote.c b/builtin/remote.c
index 63a67098a0..efbf5fb943 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;
}