diff options
| author | Elijah Newren <newren@gmail.com> | 2020-12-11 09:08:41 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2020-12-14 09:34:50 -0800 |
| commit | 00b8cccdd83c6f8c9ffefd133b291dadf8e788d7 (patch) | |
| tree | 162f45d52c7b69faa64bfa24ffb2776488c128a3 /builtin/index-pack.c | |
| parent | 26a66a6b1c653bc6c05534016992985d48267d70 (diff) | |
diffcore-rename: avoid usage of global in too_many_rename_candidates()
too_many_rename_candidates() got the number of rename destinations via
an argument to the function, but the number of rename sources via a
global variable. That felt rather inconsistent. Pass in the number of
rename sources as an argument as well.
While we are at it... We had a local variable, num_src, that served two
purposes. Initially it was set to the global value, but later was used
for counting a subset of the number of sources. Since we now have a
function argument for the former usage, introduce a clearer variable
name for the latter usage.
This patch has no behavioral changes; it's just renaming and passing an
argument instead of grabbing it from the global namespace. (You may
find it easier to view the patch using git diff's --color-words option.)
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/index-pack.c')
0 files changed, 0 insertions, 0 deletions
