Hide errors on git command
This commit is contained in:
parent
1cdc686fbe
commit
90637538b9
1 changed files with 1 additions and 1 deletions
|
@ -122,7 +122,7 @@ check_unpushed() {
|
|||
local git_repos=($(find ~ -name .git -type d -not -path '*/.vim/*' -and -not -path '*/.local/*' -and -not -path '*/builds/*' -exec dirname {} \;))
|
||||
for repo in "${git_repos[@]}"; do
|
||||
cd "$repo" || exit 1
|
||||
local unpushed=$(git log --pretty=format:'%h' '@{u}..' | wc -c)
|
||||
local unpushed=$(git log --pretty=format:'%h' '@{u}..' 2>/dev/null | wc -c)
|
||||
if [ "$unpushed" -ne 0 ]; then
|
||||
echo "Unpushed changes in $repo"
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue