Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

VCS_STATUS_NUM_UNTRACKED does not honor status.showuntrackedfiles all #221

Closed
Syphdias opened this issue Mar 24, 2021 · 3 comments
Closed

Comments

@Syphdias
Copy link

For a untracked directory VCS_STATUS_NUM_UNTRACKED only adds 1 instead of the file count if status.showuntrackedfiles is all.

Steps to reproduce:

❯ cd $(mktemp -d)

/tmp/tmp.5kOLNoFQia
❯ git init
Initialized empty Git repository in /tmp/tmp.5kOLNoFQia/.git/

/tmp/tmp.5kOLNoFQia  master
❯ mkdir foo

/tmp/tmp.5kOLNoFQia  master
❯ touch foo/{bar,baz}

/tmp/tmp.5kOLNoFQia  master ?1
❯ git status
On branch master

No commits yet

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	foo/

nothing added to commit but untracked files present (use "git add" to track)

/tmp/tmp.5kOLNoFQia  master ?1
❯ echo $VCS_STATUS_NUM_UNTRACKED
1

/tmp/tmp.5kOLNoFQia  master ?1
❯ git config --local status.showuntrackedfiles all

/tmp/tmp.5kOLNoFQia  master ?1
❯ git status
On branch master

No commits yet

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	foo/bar
	foo/baz

nothing added to commit but untracked files present (use "git add" to track)

/tmp/tmp.5kOLNoFQia  master ?1
❯ echo $VCS_STATUS_NUM_UNTRACKED # expected 2
1

Or is my prompt using the wrong variable?

@romkatv
Copy link
Owner

romkatv commented Mar 24, 2021

You can do this:

POWERLEVEL9K_VCS_RECURSE_UNTRACKED_DIRS=true

Good enough or do you need this to be customizable per repo?

@Syphdias
Copy link
Author

POWERLEVEL9K_VCS_RECURSE_UNTRACKED_DIRS=true

Thanks, I'll try that!

Good enough or do you need this to be customizable per repo?

Yes. I discovered the setting recently and I currently use in one repository but will try it globally. So I am not sure if this matters to me on a repo basis. I just expected it to behave differently.

@romkatv
Copy link
Owner

romkatv commented Mar 27, 2021

I just expected it to behave differently.

I think your expectations are very reasonable. I've opened #223 but there is a good chance I'll never get around to implementing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants