Re: [PATCH 7/8] ls-files: support --max-depth
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Mar 25, 2014, 11:15 UTC
- Message-ID
- <CACsJy8Awu6oNOS-m5_DNh_HGeHKgcnowUY+iz4efo3s1HYycnQ@mail.gmail.com>
- In-Reply-To
- <1457323768.788823.1395737758945.JavaMail.zimbra@imag.fr>
On Tue, Mar 25, 2014 at 3:55 PM, Matthieu Moy <matthieu.moy@grenoble-inp.fr> wrote:
Show 8 quoted lines
> ----- Original Message ----- >> The use case in mind is --max-depth=0 to stop recursion. With this we can do >> >> git config --global alias.ls 'ls-files --column --color --max-depth=0' >> >> and have "git ls" with an output very similar to GNU ls. > > One big difference though: your "git ls" does not show directories. I understand that this is easier to implement, but from the user point of view it resulted in a "wtf" from me running "git ls" in a repository containing essentially directories, and seeing just a README file in the output.
I was hoping you didn't notice :) It'll be more difficult but not impossible.
> Ideally (for me), directories should be shown with a trailing / like "ls -F" does.
I'd rather go with no trailing slash by default and add -F (which seems to be more than just '/')
-- Duy