You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't comment with disqus so I thought I would left this as an issue, I hope you don't mind :-)
At the end you mention --porcelain, stating that it's less efficient for larger repositories. Well that's not been my experience, this is the command I use on very large repositories:
git status --porcelain --ignore-submodules -unormal
I use it as part of a larger "git prompt" command I use in BASH:
function_git_prompt() {
local branch=`LC_ALL=C git symbolic-ref --short -q HEAD 2>&1`if! [[ "$branch"=~ ot\ a\ git\ repo ]];thenif [[ -z"$branch" ]];then# This command doesn't give the most obvious name sometimes
branch=`LC_ALL=C git describe --all --contains --abbrev=4 HEAD 2> /dev/null`filocal git_status="`LC_ALL=C git status --porcelain --ignore-submodules -unormal 2>&1`"if [[ -z"$git_status" ]];thenlocal ansi=42
elif [[ !"$git_status"=~?? ]];thenlocal ansi=45
elselocal ansi=43
fitest"$branch"!= master -a "$branch"!= main || branch=''echo -n '\[\e[0;37;'"$ansi"';1m\]'"$branch"'\[\e[0m\] 'fi
}
From my experience this is notably faster than alternatives in very large repositories.
Hope this helps :-)
The text was updated successfully, but these errors were encountered:
Hey!
I found your blogpost about checking if your git working directory is dirty in:
https://github.com/remarkablemark/remarkablemark.github.io/blob/master/_posts/2017/2017-10-12-check-git-dirty.md
I can't comment with disqus so I thought I would left this as an issue, I hope you don't mind :-)
At the end you mention
--porcelain
, stating that it's less efficient for larger repositories. Well that's not been my experience, this is the command I use on very large repositories:I use it as part of a larger "git prompt" command I use in BASH:
From my experience this is notably faster than alternatives in very large repositories.
Hope this helps :-)
The text was updated successfully, but these errors were encountered: