Re: [PATCH 0/4] attribute regression fix for maint-1.8.1 and upward
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Mar 27, 2013, 04:01 UTC
- Message-ID
- <CACsJy8BtmyPvU1Zrhdm9mEWTwk9GBuMEs-8ycpBHM79dGyCrMw@mail.gmail.com>
- In-Reply-To
- <7vmwtpqyui.fsf@alter.siamese.dyndns.org>
On Wed, Mar 27, 2013 at 10:57 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 21 quoted lines
> Duy Nguyen <pclouds@gmail.com> writes: > >> 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