Skip to content

Branch name for gs #15

@powelleric

Description

@powelleric

I was getting some funny output from gs. The branch was always listed as 'branch'. Looking in the function, it seems like the answer is to use the fourth field from cut.

~/manager-dev > gs
# On branch: branch
#
#
➤ Untracked files:
#
#       untracked: [1] metadata.cache
#       untracked: [2] schema.cache
#

Changing line 19 from
echo $branch_name|cut -d ' ' -f3
to:
echo $branch_name|cut -d ' ' -f4
seems to have fixed it.

Seems to make sense because when you parse the first line of git status, the branch name is the fourth column of that line: # On branch master

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions