rename field "raw" to "_raw" in struct pathspec
This patch is essentially no-op. It helps catching new use of this field though. This field is introduced as an intermediate step for the pathspec conversion and will be removed eventually. At this stage no more access sites should be introduced. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nguyễn Thái Ngọc Duy committed
Jul 14, 2013 at 15:36 UTC
b3920bbdc51fc360bde70e7c19088acfe44b9c4b
4 files changed
+7
-7
builtin/ls-tree.c
+1
-1
@@ -36,7 +36,7 @@ static int show_recursive(const char *base, int baselen, const char *pathname)
36
if (ls_options & LS_RECURSIVE)
37
return 1;
38
39
- s = pathspec.raw;
39
+ s = pathspec._raw;
40
if (!s)
41
return 0;
42
dir.c
+2
-2
@@ -152,7 +152,7 @@ int fill_directory(struct dir_struct *dir, const struct pathspec *pathspec)
152
len = common_prefix_len(pathspec);
153
154
/* Read the directory and prune it */
155
- read_directory(dir, pathspec->nr ? pathspec->raw[0] : "", len, pathspec);
155
+ read_directory(dir, pathspec->nr ? pathspec->_raw[0] : "", len, pathspec);
156
return len;
157
}
158
@@ -1293,7 +1293,7 @@ int read_directory(struct dir_struct *dir, const char *path, int len, const stru
1293
if (has_symlink_leading_path(path, len))
1294
return dir->nr;
1295
1296
- simplify = create_simplify(pathspec ? pathspec->raw : NULL);
1296
+ simplify = create_simplify(pathspec ? pathspec->_raw : NULL);
1297
if (!len || treat_leading_path(dir, path, len, simplify))
1298
read_directory_recursive(dir, path, len, 0, simplify);
1299
free_simplify(simplify);
pathspec.c
+3
-3
@@ -287,7 +287,7 @@ void parse_pathspec(struct pathspec *pathspec,
287
raw[0] = prefix;
288
raw[1] = NULL;
289
pathspec->nr = 1;
290
- pathspec->raw = raw;
290
+ pathspec->_raw = raw;
291
return;
292
}
293
@@ -297,7 +297,7 @@ void parse_pathspec(struct pathspec *pathspec,
297
298
pathspec->nr = n;
299
pathspec->items = item = xmalloc(sizeof(*item) * n);
300
- pathspec->raw = argv;
300
+ pathspec->_raw = argv;
301
prefixlen = prefix ? strlen(prefix) : 0;
302
303
for (i = 0; i < n; i++) {
@@ -357,7 +357,7 @@ const char **get_pathspec(const char *prefix, const char **pathspec)
357
PATHSPEC_ALL_MAGIC & ~PATHSPEC_FROMTOP,
358
PATHSPEC_PREFER_CWD,
359
prefix, pathspec);
360
- return ps.raw;
360
+ return ps._raw;
361
}
362
363
void copy_pathspec(struct pathspec *dst, const struct pathspec *src)
pathspec.h
+1
-1
@@ -11,7 +11,7 @@
11
#define PATHSPEC_ONESTAR 1 /* the pathspec pattern sastisfies GFNM_ONESTAR */
12
13
struct pathspec {
14
- const char **raw; /* get_pathspec() result, not freed by free_pathspec() */
14
+ const char **_raw; /* get_pathspec() result, not freed by free_pathspec() */
15
int nr;
16
unsigned int has_wildcard:1;
17
unsigned int recursive:1;