mirror of
https://github.com/git/git
synced 2024-08-24 18:26:02 +00:00
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>
This commit is contained in:
parent
4a45b2f347
commit
fcce0da975
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue