summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Ævar Arnfjörð Bjarmason <avarab@gmail.com>2021-04-12 19:15:22 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-05-11 12:47:31 +0900
commit5d35a9531cc9af717383bc11c2dfa4edc020ac56 (patch)
tree28c5430f8b0ff26932983a81e31e9235daa79dc3
parentpickaxe -S: support content with NULs under --pickaxe-regex (diff)
downloadtgif-5d35a9531cc9af717383bc11c2dfa4edc020ac56.tar.xz
pickaxe: rename variables in has_changes() for brevity
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 <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--diffcore-pickaxe.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/diffcore-pickaxe.c b/diffcore-pickaxe.c
index be0dd683b6..23362a2359 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,