all repos — dotfiles @ 0c50ed1f26c92796f886fb535ca06b64483662cb

my *nix dotfiles

prompt: Clean up git.go
Anirudh Oppiliappan x@icyphox.sh
Mon, 09 Aug 2021 17:02:32 +0530
commit

0c50ed1f26c92796f886fb535ca06b64483662cb

parent

f434b3edc5b0f8b7fa32030447e94e8431cd605a

1 files changed, 2 insertions(+), 3 deletions(-)

jump to
M prompt/git.goprompt/git.go

@@ -22,7 +22,6 @@ }

} cwd = filepath.Dir(cwd) } - return "" } // Returns the current git branch or current ref sha.

@@ -33,10 +32,10 @@ sha := h.Strings()[1]

if branch := filepath.Base(head); branch != "HEAD" { return branch } else { - // Detached HEAD state. + // Detached HEAD state; return the first 7 + // chars of commit sha. return sha[:7] } - return "" } // Returns • if clean, else ×.