Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
diff: rename 'this' variables
author
Brandon Williams
<bmwill@google.com>
Wed, 14 Feb 2018 18:59:28 +0000
(10:59 -0800)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 22 Feb 2018 18:08:05 +0000
(10:08 -0800)
Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
ae90bdc
)
diff --git
a/diff.c
b/diff.c
index 0a9a0cdf18f1ddd18f0939c49d29a311450d0be3..f7df227f47ca0066c02e950f8d46157aba8c7ef1 100644
(file)
--- a/
diff.c
+++ b/
diff.c
@@
-2594,14
+2594,14
@@
struct dirstat_dir {
static long gather_dirstat(struct diff_options *opt, struct dirstat_dir *dir,
unsigned long changed, const char *base, int baselen)
{
static long gather_dirstat(struct diff_options *opt, struct dirstat_dir *dir,
unsigned long changed, const char *base, int baselen)
{
- unsigned long
this_dir
= 0;
+ unsigned long
sum_changes
= 0;
unsigned int sources = 0;
const char *line_prefix = diff_line_prefix(opt);
while (dir->nr) {
struct dirstat_file *f = dir->files;
int namelen = strlen(f->name);
unsigned int sources = 0;
const char *line_prefix = diff_line_prefix(opt);
while (dir->nr) {
struct dirstat_file *f = dir->files;
int namelen = strlen(f->name);
- unsigned long
thi
s;
+ unsigned long
change
s;
char *slash;
if (namelen < baselen)
char *slash;
if (namelen < baselen)
@@
-2611,15
+2611,15
@@
static long gather_dirstat(struct diff_options *opt, struct dirstat_dir *dir,
slash = strchr(f->name + baselen, '/');
if (slash) {
int newbaselen = slash + 1 - f->name;
slash = strchr(f->name + baselen, '/');
if (slash) {
int newbaselen = slash + 1 - f->name;
-
thi
s = gather_dirstat(opt, dir, changed, f->name, newbaselen);
+
change
s = gather_dirstat(opt, dir, changed, f->name, newbaselen);
sources++;
} else {
sources++;
} else {
-
thi
s = f->changed;
+
change
s = f->changed;
dir->files++;
dir->nr--;
sources += 2;
}
dir->files++;
dir->nr--;
sources += 2;
}
-
this_dir += thi
s;
+
sum_changes += change
s;
}
/*
}
/*
@@
-2629,8
+2629,8
@@
static long gather_dirstat(struct diff_options *opt, struct dirstat_dir *dir,
* under this directory (sources == 1).
*/
if (baselen && sources != 1) {
* under this directory (sources == 1).
*/
if (baselen && sources != 1) {
- if (
this_dir
) {
- int permille =
this_dir
* 1000 / changed;
+ if (
sum_changes
) {
+ int permille =
sum_changes
* 1000 / changed;
if (permille >= dir->permille) {
fprintf(opt->file, "%s%4d.%01d%% %.*s\n", line_prefix,
permille / 10, permille % 10, baselen, base);
if (permille >= dir->permille) {
fprintf(opt->file, "%s%4d.%01d%% %.*s\n", line_prefix,
permille / 10, permille % 10, baselen, base);
@@
-2639,7
+2639,7
@@
static long gather_dirstat(struct diff_options *opt, struct dirstat_dir *dir,
}
}
}
}
}
}
- return
this_dir
;
+ return
sum_changes
;
}
static int dirstat_compare(const void *_a, const void *_b)
}
static int dirstat_compare(const void *_a, const void *_b)