On Fri, Mar 22, 2024 at 01:55:17PM -0500, Justin Tobler wrote:
On 24/03/22 01:22PM, Patrick Steinhardt wrote:
quoted
It is comparatively hard to understand how exactly the binary search
over refnames works given that the function and variable names are not
exactly easy to grasp. Rename them to make this more obvious. This
should not result in any change in behaviour.
Signed-off-by: Patrick Steinhardt <redacted>
---
reftable/refname.c | 44 ++++++++++++++++++++++----------------------
1 file changed, 22 insertions(+), 22 deletions(-)
diff --git a/reftable/refname.c b/reftable/refname.c
index 64eba1b886..9ec488d727 100644
--- a/reftable/refname.c
+++ b/reftable/refname.c
@@ -12,15 +12,15 @@
#include "refname.h"
#include "reftable-iterator.h"
-struct find_arg {
- char **names;
- const char *want;
+struct refname_needle_lesseq_args {
+ char **haystack;
+ const char *needle;
};
I agree that the previous `names` and `want` are a bit ambiguous. What
do you think about `refnames` and `target_refname` instead?
As said in the preceding commit I was rather aiming for consistency
across the callsites, so I'll keep this as-is for now. I'm happy to be
overruled though if others feel the same way.
Patrick