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

Improve git prompt during rebase conflicts #344

Open
bphenriques opened this issue Jan 20, 2024 · 6 comments
Open

Improve git prompt during rebase conflicts #344

bphenriques opened this issue Jan 20, 2024 · 6 comments

Comments

@bphenriques
Copy link

Hello, thank you for the project!

Short: when a rebase has conflicts, the base branch is shown rather than the current one.

Reproduce steps:

  1. Have two branches A
  2. Create a branch B out of A and change a file. Commit.
  3. Go to branch A and modify the same file. Commit.
  4. Go to branch B and git rebase A. It should prompt you that you have conflicts and you may need to resolve them.

Expectations: the current branch should still be B but in the middle of a rebase. Ideally it should show that we are in the middle of a rebase. The last line in the screenshot below:

image

My setup

Variables:

        set -U pure_enable_single_line_prompt true
        set -U pure_enable_virtualenv false
        set -U pure_color_success green
        set -U pure_shorten_window_title_current_directory_length 1
        set -g async_prompt_functions _pure_prompt_git

Regarding plugins besides pure, I have autopair, fish-async-prompt and some custom ones that have no relation with git. I can share my dotfiles (nix though) if helpful.

If there is interest, I can look into it and perhaps follow a similar format to powerlevel10k (I came from zsh). Suggestions?

Env

Pure

4.8.0

Fish

fish, version 3.7.0

OS/distribution

MacOS
@bphenriques
Copy link
Author

Example from powerlevel10k:
image

Perhaps too verbose. At least it is clear we are in the middle of a rebase

@aayushgakhar
Copy link

https://github.com/aayushgakhar/pure
wanted same. hows this
Screenshot 2024-08-06 at 11 39 42 PM

@bphenriques
Copy link
Author

I like it 👍

@aayushgakhar
Copy link

glad you like it
i also added some more stuff to the git prompt. it shows counts of files changed and staged and stuff. maybe i should add a flag to disable that. otherwise would be too crowded on a single line.

@bphenriques
Copy link
Author

I personally like the minimal look of powerlevel10k when rebasing (where I am and how many rebasss left). I personally dont need much else. Not sure what philosophy we should use in Pure

@aayushgakhar
Copy link

yeah ik
i just did that extra stuff cuz i had it in my p10k theme. I've added a flag (pure_enable_git_enhanced) which disables the additional features by default. left the rebasing stuff on.

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