Skip to content

Commit

Permalink
chore(pre-hook): more concise
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlesChiuGit authored Dec 28, 2022
1 parent 0c83cf6 commit a80ff0d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions git-hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@ output=$(git pull --no-rebase)

# Handle non error output as otherwise it gets shown with any exit code by logseq
if [ "$output" = "Already up to date." ]; then
git add -A
# no output
exit 0
:
else
# probably error print it to screen
echo "${output}"
git add -A
fi

git add -A

0 comments on commit a80ff0d

Please sign in to comment.