Thread (24 messages) flat view 24 messages, 4 authors, 2016-06-15

Re: [PATCH v2 2/2] sha1_file: use strncmp for string comparison

From: Duy Nguyen <hidden>
Date: 2016-06-15 23:01:46

On Mon, Jun 30, 2014 at 8:43 PM, Jeff King [off-list ref] wrote:
quoted
diff --git a/sha1_file.c b/sha1_file.c
index 394fa45..8adab14 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -1207,7 +1207,8 @@ static void prepare_packed_git_one(char *objdir, int local)
              if (has_extension(de->d_name, ".idx")) {
                      /* Don't reopen a pack we already have. */
If we don't follow my suggestion above, we still have this
has_extension. This is a reimplementation of ends_with, isn't it? We can
probably drop it and just use ends_with.
This calls for another patch if we just want to kill has_extension()
in favor of ends_with(). There are 12 call sites of it.
-- 
Duy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help