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

Show status flag of repo in statusline #219

Closed
wants to merge 2 commits into from

Commits on Jul 3, 2012

  1. Show status flag of repo in statusline

    Status flags of .git repository are shown next to the branch name as
    below.
      [master*+$%]
    
    Try to mimic '$(__git_ps1 " (%s)")' of 'git-completion.bash'
    (GIT_PS1_SHOWDIRTYSTATE / GIT_PS1_SHOWSTASHSTATE / GIT_PS1_SHOWUNTRACKEDFILES)
    
      # dirty_flag - '*': modified, but not staged flag
                     '+': staged (to be committed) flag
      # stash_flag - '$': something is stashed
      # untracked  - '%': there're untracked files
    
    In vim, checking repo_status is done by calling 'git' externally,
    vim-user can be tormented with severe performance degradations.
    Accordingly, makes status checking as less as possible - only when
    .git/index is modified, and files in .git work tree are modified.
    
    To enable this feature, declare below variables somewhere in vimrc
    
        let g:fugitive_stl_showdirtystate = 1
        let g:fugitive_stl_showstashstate = 1
        let g:fugitive_stl_showuntrackedfiles = 1
    elien122 committed Jul 3, 2012
    Configuration menu
    Copy the full SHA
    69e4456 View commit details
    Browse the repository at this point in the history

Commits on Jul 4, 2012

  1. Combine repo_state variables into one Dictionary

    Several variables which contain the repo status are combined into single
    Dictionary.
    
    Also, git_index_mod_time_old gets changed its type into buffer(b:) due
    to support the situation when multiple 'index' files exist in one work
    tree, such as submodule.
    elien122 committed Jul 4, 2012
    Configuration menu
    Copy the full SHA
    cb8b162 View commit details
    Browse the repository at this point in the history