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

Prompt shows all files as changed #480

Open
royteeuwen opened this issue Jun 14, 2021 · 2 comments
Open

Prompt shows all files as changed #480

royteeuwen opened this issue Jun 14, 2021 · 2 comments

Comments

@royteeuwen
Copy link

I have an issue that the git prompt shows every file as changed, while there are no changes, for example:

~/Development/my-project [develop|●2118…2118] 

10:39 $ git status
On branch develop
Your branch is up to date with 'origin/develop'.

nothing to commit, working tree clean
@lukehunter-cs
Copy link

I had this issue as well, and I started running some of the bash functions manually, and then I discovered it was working correctly again, but I have no idea why and can't reproduce the error. The functions I ran were git_prompt_dir and updatePrompt but I don't know why those would have fixed it -- both my existing shells and brand new shells all of a sudden started working so I don't know how it could be that. I'm running bash-git-prompt 2.7.1 and git 2.24.3 fwiw

@glepretre
Copy link

We faced this issue in a project using nix shell because it modifies TMPDIR and bash-git-prompt then show changes that are not real, due to this commit: feb7f35

When TMPDIR changes, the indexes are different when there is no change in git.

Could we only use TMPDIR when /tmp does not exist?
Currently it looks the opposite to me: TMPDIR is the default and /tmp the fallback

glepretre referenced this issue Nov 29, 2024
…n termux)

Private index was tried to create in nonexistent location, no error
was ever displayed, and then unconditionally GIT_INDEX_FILE variable
was set pointing to nonexistent path. Git used this location and
reported many changed files.

It is common on Android devices - there is no /tmp directory
Termux creates one and sets TMPDIR variable, which is commonly
honored by most of unix utilities.

Fixes issue #338 - Fixes behaviour if `/tmp` dir does not exist
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

3 participants