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

New Active Fork with Fixes and New Features #123

Open
starcraftman opened this issue Jun 3, 2018 · 5 comments
Open

New Active Fork with Fixes and New Features #123

starcraftman opened this issue Jun 3, 2018 · 5 comments

Comments

@starcraftman
Copy link

starcraftman commented Jun 3, 2018

My Active Fork

Hello. I am writing this in the hope that people who use this and want fixes/new features will follow me over to my fork. It does not seem like Olivier will resume maintenance (or select another maintainer) so I think this is our only recourse to prevent duplication. I've made made quite substantial fixes/improvements listed below. I'll try to be an active maintainer. I'm just trying to avoid the problem we are currently having with 248 other forks, probably all making the same repetitive patches to fix git 2.17 or implement small new features. If you like my fork and want to help promote it's visibility, please star it. I don't think there's anything else to do to promote it, Google will continue pointing to the main.

I will eventually go through all the old issues here and the PRs and see if there's anything I wish to put onto my fork. Naturally anyone's issues/PRs are welcome. I'll try to get to it as I can.

The only concern is that I don't write Haskell so if others will be so kind as to provide PRs that would be great. If there's any questions, we can discuss Haskell changes needed on my fork's ongoing issue for that. I won't let Haskell gitstatus get broken, but it may lag behind in features until a PR comes unfortunately.

Below I've reposted part of my wiki page discussing my fixes/improvements over the current olivierverdier repo. You can of course always see my commit history and the code for the most accurate description.

Hope you guys enjoy! Remember please star.


Notable Changes

  • Complete rewrite of gitstatus.py for readability and improved performance. Notably eliminated all subprocess calls, now parse STDIN.

  • Complete unit testing of gitstatus.py. Standard python testing setup of: tox + pytest + flake8 + pylint.

  • Travis tests against supported python versions: 2.7, 3.4, 3.5, 3.6.

  • Compatability with git 2.17+ (common recurring problem noted on main repo)

  • Added ability to set python interpreter used to run gitstatus.py, ZSH_GIT_PROMPT_PYBIN=/path/to/interp

Python only features (until Haskell patched)

  • Added indicator to show # of stashes on the repository.
    image

  • Added indicator to show if the branch has any tracking set (i.e. it is assumed local if not tracking). It is possible you pushed it without -u and thus no tracking set.
    image

  • Added option to see the upstream remote currently tracked. You may choose to either always see remote/branch or just see remote when the branch matches the local one.
    image

  • Merging indicator appears any time you are merging. image

  • Rebase indicator appears during rebases, shows the current and total number of commits to work through. image

Due to the rewrite there may be regressions or changes in behaviour, if you encounter them please make an issue. If you want to help and have an idea, make a PR by all means.

@aauren
Copy link

aauren commented Jun 29, 2018

Thanks @starcraftman for taking the initiative and getting a (hopefully) official fork going!

@starcraftman
Copy link
Author

starcraftman commented Jul 13, 2018

I'm glad you and others like it. Unfortunately, it is hard when the main maintainer goes inactive due to git's decentralized nature and github favouring the original. hopefully users find it. The python version works well now and has feature parity with bash-git-prompt,

PRs are in progress to make parity with Haskell version and a newer CPP version (I can maintain the latter on my own, unlike the former). I'll update above when they merge. These are both roughly an order of magnitude faster than gitstatus.py. Sadly the python interpreter startup means it really isn't suited on slower machines to the task, can introduce a noticeable delay between prompts.

Most portable solution would probably be a (Z)sh reimplementation but I can't really be bothered. Too much text processing and conditionals.

@Felixoid
Copy link

@olivierverdier
Hello. The prompt made by you is incredible! It's very sad that repo is abandoned and wasn't update since 2016. Please, do a favor and either include some co-maintainer or header with a link to the new active fork.

With best regards an thanks,
Felixoid

@polyzen
Copy link

polyzen commented Dec 28, 2018

A similar solution written in Rust: https://github.com/Streetwalrus/gitprompt-rs

@woefe
Copy link

woefe commented Mar 31, 2019

I wrote another similar solution using only shell scripting/awk scripting: https://github.com/woefe/git-prompt.zsh. From my tests, this is quite a bit faster than using Python.

The Rust prompt mentioned above is even faster than my prompt. However, when you are not in a git repo my prompt is still faster. And the Rust prompt is in my opinion harder to customize. You will have to patch the Rust source and recompile it, if you want to customize it.

djpowers added a commit to djpowers/dotfiles that referenced this issue Sep 8, 2019
- main project installed via homebrew appears to not be maintained
- add instructions to clone done fork, which has bug fixes and feature
  to show stash
- create .gitignore to not add zsh-git-prompt repo to source control
- see this issue for more info: olivierverdier/zsh-git-prompt#123
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

5 participants