Skip to content

Commit

Permalink
pickaxe: rename variables in has_changes() for brevity
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
avar authored and gitster committed May 11, 2021
1 parent 52e011c commit 5d35a95
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions diffcore-pickaxe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 5d35a95

Please sign in to comment.