https://github.com/akiomik/git-branch-status

A command line tool for displaying git branch colored by status

https://github.com/akiomik/git-branch-status

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (6.9%) to scientific vocabulary

Keywords

cli git git-branch git-status prompt rust vcs-information zsh
Last synced: 5 months ago · JSON representation

Repository

A command line tool for displaying git branch colored by status

Basic Info
  • Host: GitHub
  • Owner: akiomik
  • License: apache-2.0
  • Language: Rust
  • Default Branch: main
  • Homepage:
  • Size: 594 KB
Statistics
  • Stars: 5
  • Watchers: 2
  • Forks: 0
  • Open Issues: 0
  • Releases: 1
Topics
cli git git-branch git-status prompt rust vcs-information zsh
Created over 4 years ago · Last pushed 7 months ago
Metadata Files
Readme Funding License

README.md

git-branch-status

A command line tool for displaying git branch colored by status, like zsh's vcs_info.

screenshot

Installation

sh git clone https://github.com/akiomik/git-branch-status.git && cd git-branch-status cargo build --release cp target/release/git-branch-status ~/bin

Usage

Zsh

Add the following to ~/.zshrc:

```sh

~/.zshrc

setopt prompt_subst RPROMPT='$(git branch-status --mode zsh)' ```

Zsh with Starship 🚀

Add the following to ~/.config/starship.toml:

```sh format = """ $directory\ $custom\ $line_break\ $character"""

[custom.branchstatus] command = "git branch-status --mode zsh" when = "[[ -d .git ]] || [[ git rev-parse --git-dir > /dev/null 2>&1; echo $? -eq 0 ]]" format = " on $output" ```

Benchmark

Run ./scripts/bench.sh. git-branch-status is about 5x faster than vcs_info on M1 MacBook Pro (2021).

```sh ❯ ./scripts/bench.sh Setup vcs_info...done! Setup git-branch-status...done!

Run 'vcsinfo; echo $vcsinfomsg0_' 100 times ....................................................................................................done! Elapsed time: 2029ms

Run './target/release/git-branch-status --mode zsh' 100 times ....................................................................................................done! Elapsed time: 404ms ```

Owner

  • Name: Akiomi KAMAKURA
  • Login: akiomik
  • Kind: user
  • Location: Japan

Bird lover.

GitHub Events

Total
  • Watch event: 1
  • Delete event: 18
  • Issue comment event: 3
  • Push event: 19
  • Pull request event: 42
  • Create event: 20
Last Year
  • Watch event: 1
  • Delete event: 18
  • Issue comment event: 3
  • Push event: 19
  • Pull request event: 42
  • Create event: 20

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 0
  • Total pull requests: 164
  • Average time to close issues: N/A
  • Average time to close pull requests: 5 days
  • Total issue authors: 0
  • Total pull request authors: 2
  • Average comments per issue: 0
  • Average comments per pull request: 0.29
  • Merged pull requests: 109
  • Bot issues: 0
  • Bot pull requests: 125
Past Year
  • Issues: 0
  • Pull requests: 28
  • Average time to close issues: N/A
  • Average time to close pull requests: 4 days
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.14
  • Merged pull requests: 18
  • Bot issues: 0
  • Bot pull requests: 28
Top Authors
Issue Authors
  • dependabot[bot] (1)
Pull Request Authors
  • dependabot[bot] (137)
  • akiomik (39)
Top Labels
Issue Labels
dependencies (1)
Pull Request Labels
dependencies (137) rust (14) enhancement (8) bug (5) documentation (1)

Dependencies

Cargo.lock cargo
  • ansi_term 0.12.1
  • atty 0.2.14
  • autocfg 1.0.1
  • bitflags 1.3.2
  • cc 1.0.69
  • cfg-if 1.0.0
  • clap 3.1.18
  • clap_lex 0.2.0
  • form_urlencoded 1.0.1
  • git2 0.14.4
  • hashbrown 0.11.2
  • hermit-abi 0.1.19
  • idna 0.2.3
  • indexmap 1.8.0
  • jobserver 0.1.24
  • libc 0.2.101
  • libgit2-sys 0.13.4+1.4.2
  • libssh2-sys 0.2.21
  • libz-sys 1.1.3
  • log 0.4.14
  • matches 0.1.9
  • openssl-probe 0.1.4
  • openssl-sys 0.9.66
  • os_str_bytes 6.0.0
  • percent-encoding 2.1.0
  • pkg-config 0.3.19
  • strsim 0.10.0
  • termcolor 1.1.3
  • textwrap 0.15.0
  • tinyvec 1.3.1
  • tinyvec_macros 0.1.0
  • unicode-bidi 0.3.6
  • unicode-normalization 0.1.19
  • url 2.2.2
  • vcpkg 0.2.15
  • winapi 0.3.9
  • winapi-i686-pc-windows-gnu 0.4.0
  • winapi-util 0.1.5
  • winapi-x86_64-pc-windows-gnu 0.4.0
Cargo.toml cargo
  • ansi_term 0.12
  • clap 3.1.18
  • git2 0.14
.github/workflows/release.yml actions
  • actions/cache v3 composite
  • actions/checkout v3 composite
  • softprops/action-gh-release v1 composite
.github/workflows/rust-ci.yml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite