-
-
Notifications
You must be signed in to change notification settings - Fork 955
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
Show added git status when staged file is modified #363
Conversation
Now both modified and added indicators are shown when a staged file in modified in working copy or index. Fixes : spaceship-prompt#355
@maximbaz have any doubts? |
I think it's in line with the current behavior, however there is the same issue for "removed" file - the To keep it consistent, "deleted in index" should also become |
As soon as you fix the status of "removed files in index", I think you should merge. The text below should not hold the merge, but I just want to use this opportunity to explain why I find the current behavior of I want to look at the git_status part of the prompt and understand the state of the repo. Suppose the status is
In other words, by looking at On the other hand, with #359 any status can only mean one state of the repo, there is no trickery. The same example as above will be:
|
Thanks for the heads up, Let me look into that. Agree that these indicators are not based on index/working tree statuses. Because These reasonings confuse me and I'm unable to reproduce those. They are behaving as you described in the second part. I might have completely misunderstood the cases you were referring, Please correct me.
If there are no unstaged modified files, Current behaviour doesn't show modified indicator.
There are no
|
Oh, sorry, I completely misunderstood the desired behavior of this PR, @salmanulfarzy thanks for your examples, now it makes more sense! The origin of my misunderstanding was that I though you made |
Wait... if you made "modified and then staged" show up as |
Does the order of status indicators matter in prompt ? It's not exactly as the changes being made, Just being in the order they are being parsed in the script.
I have conflicted opinion on this. From your argument it makes sense to just show |
I'm all for consistency, if you make "removed= |
I'll make the necessary changes to reflect this behavior. |
After you do this, I encourage you to check out #359 again. Just try to look at it from a different perspective, I have a picture there, compare the status icons of your PR vs that one. You will notice that The only inconsistency left in this PR is the "renamed" indicator - everything staged (new file, modification, removal) is marked as |
Ping ! |
Why the git shows the renamed files in status and marks then as renamed? Honestly, I don't understand the problem. I live with current behavior and haven't ever noticed any confusions yet. |
It's not a problem, it's inconsistency - staged created files are marked with But as I said in the very beginning, do not hold the PR from being merged if you are okay with that 🙂 |
Resolved conflicts. If merging, Please squash. |
Description
Now both modified and added indicators are shown when a staged file is modified in working copy or index.
Screenshot
Please, attach a screenshot, if possible.
Fixes : #355