Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
try_remove_empty_parents(): rename parameter "name" -> "refname"
author
Michael Haggerty
<mhagger@alum.mit.edu>
Fri, 6 Jan 2017 16:22:40 +0000
(17:22 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Sun, 8 Jan 2017 03:30:09 +0000
(19:30 -0800)
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>
refs/files-backend.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
ce0af24
)
diff --git
a/refs/files-backend.c
b/refs/files-backend.c
index 9abd7c39cdb5291f753e6d4f1239debb1413219f..92a9d99ba535081d61af6347d38ebfa10faf9877 100644
(file)
--- 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.
/*
* Remove empty parents, but spare refs/ and immediate subdirs.
- * Note: munges *name.
+ * Note: munges *
ref
name.
*/
*/
-static void try_remove_empty_parents(char *name)
+static void try_remove_empty_parents(char *
ref
name)
{
char *p, *q;
int i;
{
char *p, *q;
int i;
- p = name;
+ p =
ref
name;
for (i = 0; i < 2; i++) { /* refs/{heads,tags,...}/ */
while (*p && *p != '/')
p++;
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 (q == p)
break;
*q = '\0';
- if (rmdir(git_path("%s", name)))
+ if (rmdir(git_path("%s",
ref
name)))
break;
}
}
break;
}
}