Re: [PATCH v3 1/1] clone: report duplicate entries on case-insensitive filesystems

2 messages, 2 authors, 2018-08-13 · open the first message on its own page

Re: [PATCH v3 1/1] clone: report duplicate entries on case-insensitive filesystems

From: Junio C Hamano <hidden>
Date: 2018-08-13 16:55:09

Duy Nguyen [off-list ref] writes:
I was careless and checked the wrong variable (should have checked
nr_duplicates not state.nr_duplicates; the second is a pointer). So we
always get this warning (and with no following list of files)
Heh, does that bug go away if you got rid of the pointer-ness of the
field and store the value directly in there?
quoted
    I also notice that this patch doesn't add any tests... :)
This is platform specific and I was to be frank a bit lazy. Will
consider adding a test with CASE_INSENSITIVE_FS after this.

Re: [PATCH v3 1/1] clone: report duplicate entries on case-insensitive filesystems

From: Duy Nguyen <hidden>
Date: 2018-08-13 17:12:39

On Mon, Aug 13, 2018 at 6:55 PM Junio C Hamano [off-list ref] wrote:
Duy Nguyen [off-list ref] writes:
quoted
I was careless and checked the wrong variable (should have checked
nr_duplicates not state.nr_duplicates; the second is a pointer). So we
always get this warning (and with no following list of files)
Heh, does that bug go away if you got rid of the pointer-ness of the
field and store the value directly in there?
You mean replacing the pointer with a real counter in struct checkout?
That would not work (it was my first option) because struct checkout
is passed around as a const struct. entry.c code is not allowed to
make any updates there. So I got rid of both "nr_duplicates" and just
count again at the bottom of check_updates(). It's not that expensive
and it simplifies the code.
-- 
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