summaryrefslogtreecommitdiff
path: root/refs
diff options
context:
space:
mode:
authorLibravatar Michael Haggerty <mhagger@alum.mit.edu>2017-01-06 17:22:40 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-01-07 19:30:09 -0800
commit730e0342869744e33a2db76fda5f3acf28fc889c (patch)
tree8e732f8626d12160946d3e0ff3a802347d109a72 /refs
parentdelete_ref_loose(): inline function (diff)
downloadtgif-730e0342869744e33a2db76fda5f3acf28fc889c.tar.xz
try_remove_empty_parents(): rename parameter "name" -> "refname"
This is the standard nomenclature. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs')
-rw-r--r--refs/files-backend.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 9abd7c39cd..92a9d99ba5 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -2282,13 +2282,13 @@ static int pack_if_possible_fn(struct ref_entry *entry, void *cb_data)
/*
* Remove empty parents, but spare refs/ and immediate subdirs.
- * Note: munges *name.
+ * Note: munges *refname.
*/
-static void try_remove_empty_parents(char *name)
+static void try_remove_empty_parents(char *refname)
{
char *p, *q;
int i;
- p = name;
+ p = refname;
for (i = 0; i < 2; i++) { /* refs/{heads,tags,...}/ */
while (*p && *p != '/')
p++;
@@ -2306,7 +2306,7 @@ static void try_remove_empty_parents(char *name)
if (q == p)
break;
*q = '\0';
- if (rmdir(git_path("%s", name)))
+ if (rmdir(git_path("%s", refname)))
break;
}
}