MCPcopy Create free account
hub / github.com/cli/cli / branchWithGitStatus

Method branchWithGitStatus

pkg/cmd/codespace/common.go:216–222  ·  view source on GitHub ↗

branchWithGitStatus returns the branch with a star if the branch is currently being worked on.

()

Source from the content-addressed store, hash-verified

214// branchWithGitStatus returns the branch with a star
215// if the branch is currently being worked on.
216func (c codespace) branchWithGitStatus() string {
217 if c.hasUnsavedChanges() {
218 return c.GitStatus.Ref + gitStatusDirty
219 }
220
221 return c.GitStatus.Ref
222}
223
224// hasUnsavedChanges returns whether the environment has
225// unsaved changes.

Callers 3

displayNameMethod · 0.95
ListMethod · 0.95
formatGitStatusFunction · 0.80

Calls 1

hasUnsavedChangesMethod · 0.95

Tested by

no test coverage detected