Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

missing git-status icon for directories (v1.3.1) #334

Closed
1 of 5 tasks
draptik opened this issue Jan 17, 2020 · 1 comment
Closed
1 of 5 tasks

missing git-status icon for directories (v1.3.1) #334

draptik opened this issue Jan 17, 2020 · 1 comment
Labels

Comments

@draptik
Copy link

draptik commented Jan 17, 2020

Description

  • Type of issue :
    • Installation
    • Font-related
    • Feature request
    • Bug in existing feature
    • Developer mode : Code quality / Tests / Documentation

After upgrading to colorls 1.3.1 the git-status icons for directories are missing. The git-status icon is displayed correctly for files.

Steps to reproduce:

mkdir colorls-stuff
cd colorls-stuff
touch test.txt
mkdir foo
touch foo/bar.txt
git init
git add .
git commit -am"initial commit"
colorls -l --gs
cd foo
colorls -l --gs

Note the missing git-status icon for directory foo in screenshot below.

Screenshot from 2020-01-17 07-33-11-colorls-bug

@avdv
Copy link
Collaborator

avdv commented Jan 17, 2020

Thanks for the report, I'll have a look into this as soon as I find some time.

@avdv avdv added the bug label Jan 17, 2020
avdv added a commit to avdv/colorls that referenced this issue Jan 22, 2020
git does not report any status for empty directories, and it also does not
report any status for directories without any modified, untracked or ignored
files.

To correctly show the status, we need to check whether the directory is empty if
git did not report any status codes. When empty, show it as "untracked",
otherwise show the "no changes" check mark.

Fixes athityakumar#334.
@avdv avdv mentioned this issue Jan 24, 2020
5 tasks
@avdv avdv closed this as completed in fb39a9d Jan 24, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants