feat: print new commit messages after pulling updates
This commit is contained in:
@@ -156,7 +156,10 @@ update_repo() {
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
info "Repository out of date. Pulling updates..."
|
info "Repository out of date. Pulling updates..."
|
||||||
|
local old_sha
|
||||||
|
old_sha=$(git rev-parse HEAD)
|
||||||
git fetch origin && git reset --hard origin/master && git clean -fd &>/dev/null
|
git fetch origin && git reset --hard origin/master && git clean -fd &>/dev/null
|
||||||
|
printf "\033[1;34m%s\033[0m\n" "$(git log --oneline "$old_sha"..HEAD)"
|
||||||
else
|
else
|
||||||
info "Repository not found. Cloning..."
|
info "Repository not found. Cloning..."
|
||||||
git clone --depth=1 "$REPO_URL" "$TARGET_DIR" &>/dev/null
|
git clone --depth=1 "$REPO_URL" "$TARGET_DIR" &>/dev/null
|
||||||
|
|||||||
@@ -30,7 +30,10 @@ dotstate_update() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
info "Repository out of date. Pulling updates..."
|
info "Repository out of date. Pulling updates..."
|
||||||
|
local old_sha
|
||||||
|
old_sha=$(git rev-parse HEAD)
|
||||||
git fetch origin &>/dev/null && git reset --hard origin/master &>/dev/null && git clean -fd &>/dev/null
|
git fetch origin &>/dev/null && git reset --hard origin/master &>/dev/null && git clean -fd &>/dev/null
|
||||||
|
printf "\033[1;34m%s\033[0m\n" "$(git log --oneline "$old_sha"..HEAD)"
|
||||||
cd ~
|
cd ~
|
||||||
dotstate activate
|
dotstate activate
|
||||||
exec zsh
|
exec zsh
|
||||||
|
|||||||
Reference in New Issue
Block a user