Yash-Handa / logo-ls

Modern ls command with vscode like File Icon and Git Integrations. Written in Golang
MIT License
1.14k stars 43 forks source link

git ignored files are marked as untracked when using -D option #10

Closed sulybot closed 1 month ago

sulybot commented 4 years ago

hi, when i use logo-ls -D in git repo dir, logo-ls marked all of the ignored files as untracked, but git status reports working tree clean.

Yash-Handa commented 4 years ago

Ohh, that's strange. Can you provide a pic of It (with -l flag) thanks

sulybot commented 4 years ago

Hi, here is my situation. In my git repo root dir, there is a .gitignore file. the last line, ignored the local config file, named local.properties. git status is clean, which you can see the oh-my-zsh shows, the branch is develop and the working copy is clean. but logo-ls mark the dir and the local.properties file as U, untracked. Screenshot from 2020-09-30 18-13-09

I have done some debug, I find out that the -D option implements by go-git library. I'm not sure if there are some mistakes in my .gitignore file format, and git has ignored the mistake when I run git status, or if go-git has the different behavior with my git cli, version 2.25.1. My OS is ubuntu 20.04. logo-ls installed via the .deb package file.

I also created a new repo, and write a simple .gitignore, this time logo-ls -D work correctly. It's hard to say where the problem is, I'll try to figure out and do more debug.