Thread (77 messages) 77 messages, 3 authors, 2021-04-12
STALE1922d
Revisions (2)
  1. v1 [diff vs current]
  2. v1 current

[PATCH v2 17/22] pickaxe: rename variables in has_changes() for brevity

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2021-02-16 12:04:23
Subsystem: the rest · Maintainer: Linus Torvalds

Rename the {one,two}_contains variables to c{1,2}. This will make a
follow-up change easier to read.

Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
---
 diffcore-pickaxe.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/diffcore-pickaxe.c b/diffcore-pickaxe.c
index 0bf50a2f595..66e34d254f1 100644
--- a/diffcore-pickaxe.c
+++ b/diffcore-pickaxe.c
@@ -108,9 +108,9 @@ static int has_changes(mmfile_t *one, mmfile_t *two,
 		       struct diff_options *o,
 		       regex_t *regexp, kwset_t kws)
 {
-	unsigned int one_contains = one ? contains(one, regexp, kws) : 0;
-	unsigned int two_contains = two ? contains(two, regexp, kws) : 0;
-	return one_contains != two_contains;
+	unsigned int c1 = one ? contains(one, regexp, kws) : 0;
+	unsigned int c2 = two ? contains(two, regexp, kws) : 0;
+	return c1 != c2;
 }
 
 static int pickaxe_match(struct diff_filepair *p, struct diff_options *o,
-- 
2.30.0.284.gd98b1dd5eaa7
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help