Skip to content

Branch info for status bar not detected on macOS #462

Closed
@MustafaHaddara

Description

@MustafaHaddara

Description

Branch info, remote, #commits ahead and behind aren't detected properly

GitGutter settings:

"status_bar_text": [
    "In {{repo}} on {{branch}} from {{remote}} a {{ahead}} b {{behind}},"
],

screen shot 2017-10-17 at 11 27 32 am

The master*+40 comes from GitSavvy, which I'm also using for more git integration with Sublime. It has no issues detecting that I'm on master branch 40 commits ahead of the remote.

It seems like I'm hitting this error case https://github.com/jisaacks/GitGutter/blob/master/modules/handler.py#L694 which I traced back to the output from the command on https://github.com/jisaacks/GitGutter/blob/master/modules/handler.py#L710

All of this boils down to --no-lock-index is unsupported of macOS (and I can't find mention of it on the git docs)

$ git version
git version 2.13.5 (Apple Git-94)
$ git status -b -s -u --no-lock-index
error: unknown option `no-lock-index'
usage: git status [<options>] [--] <pathspec>...

    -v, --verbose         be verbose
    -s, --short           show status concisely
    -b, --branch          show branch information
    --porcelain[=<version>]
                          machine-readable output
    --long                show status in long format (default)
    -z, --null            terminate entries with NUL
    -u, --untracked-files[=<mode>]
                          show untracked files, optional modes: all, normal, no. (Default: all)
    --ignored             show ignored files
    --ignore-submodules[=<when>]
                          ignore changes to submodules, optional when: all, dirty, untracked. (Default: all)
    --column[=<style>]    list untracked files in columns

Support Info

- Sublime Text 3143
- Platform: osx
- Arch: x64
- GitGutter 1.7.7
- Install via PC: True
- git version 2.13.5 (Apple Git-94)
- mdpopups 2.1.1
- markdown 2.6.9
- pygments 2.1a0
- jinja2 2.8

Steps to Reproduce Issue

Upgrade to GitGutter 1.7.7, use git on macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions