Skip to content

Conversation

mskalski
Copy link
Contributor

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

Additionally in case of non-existent index file most of
files were marked with D in second loop pass of gitstatus.sh
which was wrongly identified as 'Stashed'.

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

Copy link

@luisdavim luisdavim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@guenhter
Copy link
Collaborator

@mskalski Could you split the two changes into two separate commits, then I am happy to merge that one.

@mskalski
Copy link
Contributor Author

mskalski commented Oct 16, 2022

@mskalski Could you split the two changes into two separate commits, then I am happy to merge that one.

Sure, done (rebased on current master).

Could you also look at my third PR #458, with fixes for git_prompt_help and git_prompt_examples?

@guenhter
Copy link
Collaborator

@mskalski could you please again change your commits so that the title of the commit is a statement what the commit contains instead of the issue-text.

…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 magicmonty#338 - Fixes behaviour if `/tmp` dir does not exist
Additionally in case of nonexistent index file (i.e. when `/tmp`
does not exist) most of files were marked with 'D' in second loop
pass of `gitstatus.sh` which was wrongly identified as 'Stashed'.

Now it is idenified as 'changed'
@guenhter guenhter merged commit 6dbba24 into magicmonty:master Oct 22, 2022
@guenhter
Copy link
Collaborator

@mskalski sorry for being so picky. Find this now merged. Thx for your contribution

@etpinard
Copy link

Thanks very much for this PR. Works great in my termux instance!

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

Successfully merging this pull request may close these issues.

4 participants