Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
safe_create_leading_directories(): rename local variable
author
Michael Haggerty
<mhagger@alum.mit.edu>
Mon, 6 Jan 2014 13:45:22 +0000
(14:45 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 6 Jan 2014 17:34:20 +0000
(09:34 -0800)
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>
sha1_file.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
831651f
)
diff --git
a/sha1_file.c
b/sha1_file.c
index a2b9e3c50293ea5edd2a425168ed506bdc78b22f..4dd16c38f6bfa3969796845db6c41ba10b63f7b8 100644
(file)
--- 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)
{
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;
struct stat st;
- char *slash = strchr(
pos
, '/');
+ char *slash = strchr(
next_component
, '/');
if (!slash)
break;
while (*(slash + 1) == '/')
slash++;
if (!slash)
break;
while (*(slash + 1) == '/')
slash++;
-
pos
= slash + 1;
- if (!*
pos
)
+
next_component
= slash + 1;
+ if (!*
next_component
)
break;
*slash = '\0';
break;
*slash = '\0';