MCPcopy Index your code
hub / github.com/cli/cli / branchWithGitStatus

Method branchWithGitStatus

pkg/cmd/codespace/common.go:215–221  ·  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

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

Callers 3

displayNameMethod · 0.95
ListMethod · 0.95
formatGitStatusFunction · 0.80

Calls 1

hasUnsavedChangesMethod · 0.95

Tested by

no test coverage detected