Skip to content

Commit 840fc33

Browse files
aspiersgitster
authored andcommitted
dir.c: rename cryptic 'which' variable to more consistent name
'el' is only *slightly* less cryptic, but is already used as the variable name for a struct exclude_list pointer in numerous other places, so this reduces the number of cryptic variable names in use by one :-) Signed-off-by: Adam Spiers <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 95a6834 commit 840fc33

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

dir.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ void parse_exclude_pattern(const char **pattern,
349349
}
350350

351351
void add_exclude(const char *string, const char *base,
352-
int baselen, struct exclude_list *which)
352+
int baselen, struct exclude_list *el)
353353
{
354354
struct exclude *x;
355355
int patternlen;
@@ -373,8 +373,8 @@ void add_exclude(const char *string, const char *base,
373373
x->base = base;
374374
x->baselen = baselen;
375375
x->flags = flags;
376-
ALLOC_GROW(which->excludes, which->nr + 1, which->alloc);
377-
which->excludes[which->nr++] = x;
376+
ALLOC_GROW(el->excludes, el->nr + 1, el->alloc);
377+
el->excludes[el->nr++] = x;
378378
}
379379

380380
static void *read_skip_worktree_file_from_index(const char *path, size_t *size)
@@ -416,7 +416,7 @@ int add_excludes_from_file_to_list(const char *fname,
416416
const char *base,
417417
int baselen,
418418
char **buf_p,
419-
struct exclude_list *which,
419+
struct exclude_list *el,
420420
int check_index)
421421
{
422422
struct stat st;
@@ -463,7 +463,7 @@ int add_excludes_from_file_to_list(const char *fname,
463463
if (buf[i] == '\n') {
464464
if (entry != buf + i && entry[0] != '#') {
465465
buf[i - (i && buf[i-1] == '\r')] = 0;
466-
add_exclude(entry, base, baselen, which);
466+
add_exclude(entry, base, baselen, el);
467467
}
468468
entry = buf + i + 1;
469469
}

dir.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,11 @@ extern int path_excluded(struct path_exclude_check *, const char *, int namelen,
127127

128128

129129
extern int add_excludes_from_file_to_list(const char *fname, const char *base, int baselen,
130-
char **buf_p, struct exclude_list *which, int check_index);
130+
char **buf_p, struct exclude_list *el, int check_index);
131131
extern void add_excludes_from_file(struct dir_struct *, const char *fname);
132132
extern void parse_exclude_pattern(const char **string, int *patternlen, int *flags, int *nowildcardlen);
133133
extern void add_exclude(const char *string, const char *base,
134-
int baselen, struct exclude_list *which);
134+
int baselen, struct exclude_list *el);
135135
extern void free_excludes(struct exclude_list *el);
136136
extern int file_exists(const char *);
137137

0 commit comments

Comments
 (0)