aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2014-01-06 14:45:22 +0100
committerJunio C Hamano <gitster@pobox.com>2014-01-06 09:34:20 -0800
commit26c8ae2a577cd283ab9fa8ab5e5f0ced568dc034 (patch)
treef9b52c086a05059bc50df59ab990e15fa7adc634
parent831651fde8f8a8d90543917a8783962aa1a534bf (diff)
downloadgit-26c8ae2a577cd283ab9fa8ab5e5f0ced568dc034.tar.gz
git-26c8ae2a577cd283ab9fa8ab5e5f0ced568dc034.tar.xz
safe_create_leading_directories(): rename local variable
Rename "pos" to "next_component", because now it always points at the next component of the path name that has to be processed. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--sha1_file.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sha1_file.c b/sha1_file.c
index a2b9e3c50..4dd16c38f 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -107,18 +107,18 @@ int mkdir_in_gitdir(const char *path)
int safe_create_leading_directories(char *path)
{
- char *pos = path + offset_1st_component(path);
+ char *next_component = path + offset_1st_component(path);
- while (pos) {
+ while (next_component) {
struct stat st;
- char *slash = strchr(pos, '/');
+ char *slash = strchr(next_component, '/');
if (!slash)
break;
while (*(slash + 1) == '/')
slash++;
- pos = slash + 1;
- if (!*pos)
+ next_component = slash + 1;
+ if (!*next_component)
break;
*slash = '\0';