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

Re: [PATCH 0/4] attribute regression fix for maint-1.8.1 and upward

From: Duy Nguyen <hidden>
Date: 2016-06-15 22:56:32

On Wed, Mar 27, 2013 at 10:57 AM, Junio C Hamano [off-list ref] wrote:
Duy Nguyen [off-list ref] writes:
quoted
How about this? git_check_attr() now takes dtype as an argument
and the caller must not add the trailing slash.  This could be
split into two patches, one for git_check_attr prototype change,
and the other the real meat.
"git check-attr" fundamentally cannot know, but aside from that do
all the callsites know if the path in question is a directory or
not?  My impression was that there are some cases you do not
necessarily know.

"Add slash when you _know_ it is a directory, but otherwise pass the
path without trailing slash." is easier to understand than "Pass
040000 if you know it is a directory, but otherwise pass 100644",
exactly because "otherwise" in both of these instructions include
the case where the path in question _is_ a directory (you just do
not know what it is).

I do not particularly like the "trailing slash on the basename"
approach, but it feels less bad than passing dtype down.
Fair enough. I'll rebase my changes on top of yours as long term
cleanup. Maybe I can make nwildmatch take patternlen too.
-- 
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