subesokun / atom-tree-view-git-status

Shows the Git repository status in the Atom tree-view
MIT License
24 stars 2 forks source link

Git flow support #47

Closed roelofr closed 7 years ago

roelofr commented 7 years ago

Git flow is a fairly properly worked out system with clear branch name distinctions, but I couldn't see it when I was using this plugin.

Therefore, I came up with a way to show the git flow types in the header, using a combination of icons and labels (user configurable).

Some screenshots:

Enabled with both prefix and icon visible 6 repositories with both icon and prefix visible

Enabled with the prefix and branch name visible (this is the default display method) Just the prefix and branch name (default value)

Only the icon and branch name - I chose to always show the branch on master and develop, since using just an icon on such important branches is never a good idea. Just the icon

By default the tweak is disabled, as git flow is an explicit opt in. If the repository doesn't have git flow support (git flow init hasn't been run) the tweak disables itself.

The prefixes and branch names for master and develop are retrieved from the repository itself, which makes using custom prefixes and branch names a piece of cake.

Hope this is any use to you.

subesokun commented 7 years ago

@roelofr Thanks a lot for your awesome contribution! It perfectly fits the idea of this package so I'll gladly review your code 😎 . But I'm not sure if I can prepare a new release until next week.

roelofr commented 7 years ago

That's all right. All in good time :wink:

roelofr commented 7 years ago

Okay, I separated most of the code responsible for handling the git flow parameters. There are only a handful of changes to the logic to make it work. The exact changes are listed in this gist.

subesokun commented 7 years ago

Sorry for the delay, other work is recently piling up so I didn't have any chance yet to prepare a new release. Hopefully not somebody else is already eagerly looking forward to that feature. Also there seems to be something off on the master branch regarding the Atom Beta tests. So I'd need to fix that as well before releasing a new version.

subesokun commented 7 years ago

Merged but release is pending. Thanks a lot for this great feature!

subesokun commented 7 years ago

Finally fixed the build issues and released v1.4.0 🎉 ! There has been some breaking changes in the tree-view package in the latest Atom beta release. I've also updated the documentation to install gitflow-avh as this fork seems to be still active and it implements the Git Flow "support" branches.

Sorry for the huge delay. Let me know if you've facing any issues. Btw. I've enabled the Git Flow support by default 👍

radAragon commented 7 years ago

Report: I see the gray color on my master branch (actually named "releases") but the icon is missing.

Below is my .git configuration:

[gitflow "branch"]
    master = releases
    develop = develop
[gitflow "prefix"]
    feature = feature/
    bugfix = bugfix/
    release = qa
    hotfix = hotfix/
    support = support/
    versiontag =

PS: love this upgrade

subesokun commented 7 years ago

@radAragon This is the default display type so you'd need to change that in the package settings of tree-view-git-status.

radAragon commented 7 years ago

Sorry, I forgot to tell I already set this option to icon/branch name, so the develop, feature and other branches already display the icon, but the master.

subesokun commented 7 years ago

@radAragon Ok I see, I'll try to investigate it but it would help if you're creating a dedicated issue for it so that we can track the progress there.