Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support bare git repos #1055

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion .bash_prompt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ prompt_git() {
local branchName='';

# Check if the current directory is in a Git repository.
git rev-parse --is-inside-work-tree &>/dev/null || return;
local is_git;
is_git=$(git rev-parse --is-inside-work-tree 2>/dev/null)
if [ $? -ne 0 ] || [[ "$is_git" == "false" ]]; then
return
fi

# Check for what branch we’re on.
# Get the short symbolic ref. If HEAD isn’t a symbolic ref, get a
Expand Down